graph of values in the log

Comments

6 comments

  • Avatar
    Piotr Woch

    Hello Adam!

    You can only graph aggregated data, thus in order to plot your values you need to formulate the statement in a way that make aggregate values available to Sumo. For example you could bin your data using "timeslice" operator and then use

    sum(_contextSecondsAverage)/count(_contextSecondsAverage) by _timeslice (which will give you an average over the timeslice)

    or

    (assuming you define very granular timeslice, eg. 1s, which will be more granular than the frequency of your log entries)

    sum(_contextSecondsAverage) by _timeslice
    |where _sum > 0 

    (which will give you your values expressed as values of an aggregate function).

    Please let me know if these comments helped or if you found them not applicable to your case.

    0
    Comment actions Permalink
  • Avatar
    Adam Juntunen

    I tried

    _sourceCategory="prod/app/windchill/methodserver" wt.method.MethodContextMonitor.stats.summary |parse "ContextSecondsAverage=*," as _contextSecondsAverage| timeslice by 10s |sum(_contextSecondsAverage) by _timeslice|where _sum > 0

    that got me closer.  I now have basically the same columns.  A "Time" column and a "_sum" column that has the values I'd like to graph.  The difference is that now it's in an Aggregates tab.  So I tried adding the same transpose stuff as before, but with my new columns

    _sourceCategory="prod/app/windchill/methodserver" wt.method.MethodContextMonitor.stats.summary |parse "ContextSecondsAverage=*," as _contextSecondsAverage| timeslice by 10s |sum(_contextSecondsAverage) by _timeslice|where _sum > 0 |transpose row Time column _sum

    I don't get the aggregates error, but I get an error that says "Field Time not found, please check spelling and try again."

    how do I get a graph of the values and not the count of log entries?

    0
    Comment actions Permalink
  • Avatar
    Piotr Woch

    The error complain that it can't find the "Time" field. Even though the column header says "Time", from within the query the field name is different. In this case it would be "_timeslice". Please try substituting "Time" for "_timeslice" and generating your graph again.

    I would appreciate if you could please let me know if that helped.

    0
    Comment actions Permalink
  • Avatar
    Adam Juntunen

    I tried 

    _sourceCategory="prod/app/windchill/methodserver" wt.method.MethodContextMonitor.stats.summary |parse "ContextSecondsAverage=*," as _contextSecondsAverage| timeslice by 10s |sum(_contextSecondsAverage) by _timeslice|where _sum > 0|transpose row _timeslice column _sum

    and it doesn't give me any error, but it still just gives a graph of the number of log entries per timeslice Which is surprising to me

    0
    Comment actions Permalink
  • Avatar
    Piotr Woch

    Adam,

    I think the last step from achieving your goal is to remove the unnecessary "transpose" operator. Try running the exact same query you posted in your last post, take away the "transpose" operator and try charting your data using a line graph.

    Please let me know how that worked out for you.

    Thank you!

    0
    Comment actions Permalink
  • Avatar
    Adam Juntunen

    that did it.  Thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.