Ad Widget

Collapse

Parsing log for time durations and treat it as time?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • McFLY
    Junior Member
    • Apr 2014
    • 2

    #1

    Parsing log for time durations and treat it as time?

    Hello.
    I'm quite new to zabbix and I've got myself to dead end =(

    Can some one tell me how can I parse time (or uptime) from a log in H:MM:SS.mmm format and then treat it as float to calculate avg, min and max?

    For example:
    I have a log item wich stores those timings, parsed from log, in H:MM:SS.mmm format as strings (0:03:42.056 for example)
    logrt[/path/to/log,@ssessions,,,,\1]
    where @ssessions is "session time: (.:..:..\....)"

    How to treat that data as numbers? avg() function in 'Calculated' item can't evaluate that.
    I even tried to make "00342.056" from example above and it still can't evaluate that.

    /Thanks for any help
    Last edited by McFLY; 23-04-2014, 21:11.
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    I would suggest to use a custom script to parse these values and do the calculations there.

    Comment

    • McFLY
      Junior Member
      • Apr 2014
      • 2

      #3
      Originally posted by steveboyson
      I would suggest to use a custom script to parse these values and do the calculations there.
      Yes, I thought about it too, but zabbix has clever mechanics of reading only new info from logs without any custom things, so it would be a shame to not using it =\

      Comment

      Working...