Ad Widget

Collapse

Graph load avg of apps by log files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sivann
    Junior Member
    • Mar 2016
    • 8

    #1

    Graph load avg of apps by log files

    Application logs various time-consuming steps in syslog file as "step x time elapsed: y" where y is seconds.

    I would like to have a graph similar to load average which shows for each minute how much cpu time was dedicated to that step. What I tried:

    1) Created Log item, to parse logfile and get latest value (works fine)
    2) Created calculated item which gets last() value from Log[] item and graphs last value (works fine)
    3) Created a calculated item to calculate 100 * sum(of last 60 seconds of values)/60 (does not work)

    3a) I've tried the following formulas for calculated item:
    100 * sum("log[/var/log/mylog.log,\"blablah, elapsed=([0-9]+)\",,,,\1]",60) / 60

    Result: Unsupported item with error: Cannot evaluate function "sum(60)".

    3b) To cope for missing values on the sum() I tried to also use nodata:
    nodata(log[/var/log/mylog.log,\"blablah, elapsed=([0-9]+)\",,,,\1]",60) or
    sum("log[/var/log/mylog.log,\"blablah, elapsed=([0-9]+)\",,,,\1]",60) * 100 / 60

    Result:
    Cannot evaluate function "nodata(\"blablah, elapsed[0-9]+)": item "myhostname:log[/var/log/mylog.log" does not exist.

    I'm out of ideas
Working...