Ad Widget

Collapse

Help to read the custom log

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arny
    Junior Member
    • Nov 2011
    • 13

    #1

    Help to read the custom log

    Worn out with this problem and I can not find a solution to beg assistance.

    There zabbix server 1.8.5 and agent windows

    There is a log line:

    Code:
    [11.12.2013 8:02:31] Start RemoteHandleQuery(IDLogin=1191016;IDClient=12;RegQuery=60600562930;TypeQuery=29) ... end. 11.12.2013 8:02:36 time=5.094 с.
    Code:
    [11.12.2013 8:03:17] Start RemoteHandleQuery(IDLogin=1191016;IDClient=12;RegQuery=60600562931;TypeQuery=30) ... end. 11.12.2013 8:03:18 time=[B]0.828[/B] с.

    task

    Create items and trigger that reads values ​​time = 5.094, time = 0.828 and if time = "more than 50,020" trigger fires.

    thanks for any decision
  • desktop
    Junior Member
    • Dec 2013
    • 3

    #2
    Interesting thing

    i would like to know too how to resolve this issue, as I'm a newbie can;t afford this task alone, or maybe i misunderstood the documentation, cause Eng is not my primary Lang, but i would be interested in how to resolve this particular case

    anyone here?

    Comment

    • arny
      Junior Member
      • Nov 2011
      • 13

      #3
      Please help

      please tell me if you can with the means zabbix make my task
      thank you

      Comment

      • jcduss59
        Member
        • Jun 2011
        • 33

        #4
        Here it is :


        You will have to make a regexp for the pattern. But I'm not pretty sure zabbix can handle extended regex to match only "time value" and not the full line.

        Otherwise, you could create a log parser script that will match the line and use a zabbix_sender command to report the value.

        Comment

        • desktop
          Junior Member
          • Dec 2013
          • 3

          #5
          Issue resolved

          Hi all. the issue was resolved by installing v2.2 of Zabbix Server and some of the following

          IF anyone need this, i will translate and post here the solution of User:LynxChaus who posted it in Russian forum
          Create an Item
          Code:
          name: test
          type: agent (active)
          key: log[/tmp/test.log,"time=([0-9\.]+)",,,,\1]
          the output is a number, then create a trigger condition
          Code:
          {localhost:log[/tmp/test.log,"time=([0-9\.]+)",,,,\1].last()}>50.02
          and be happy with alerts.

          if there is no possibility to upgrade to v2.2, take then the UNXUTILS for windows an use old methods with tail&grep&awk. or use perl/python/powershell.
          Thanks for the solution to LynxChaus
          Last edited by desktop; 14-12-2013, 13:44.

          Comment

          Working...