Ad Widget

Collapse

Trigger: Detect lags from ping item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spikedammage
    Junior Member
    • Dec 2012
    • 4

    #1

    Trigger: Detect lags from ping item

    Hi everyone,

    Im using zabbix 2.0.3 on a debian machine.

    I'm monitoring several links (fiber, xDSL).
    For each link i got an item which returns the ping response time in ms.
    I have few triggers that alert me if a link is down or if X% of packets are lost for a given time.

    I was wondering how can i create a trigger expression that ll be true when i got an abnormal latency on a link depending on the normal reponse time of the link. I was thinking about something like that :


    In theory:
    if Y% of X last values of Z (the given item), are Greater-than the average of the same item on 1 hour then the trigger ll be true.

    i want to use the count + avg function in the same expression on the same item:

    Code:
     Zitem.[B]count[/B](#X,Zitem.[B]avg[/B](3600),"gt")>Y

    In practice i tried this :


    item.key : PingSecAvg.sh[1,{IPADDRESS}]

    Code:
    {Remote_Hosts:PingSecAvg.sh[1,{IPADDRESS}].[B]count[/B](#20,Remote_Hosts:PingSecAvg.sh[1,{IPADDRESS}].[B]avg[/B](3600),"gt")}>10
    Error throw when i try to save the trigger :
    Unexpected symbol "," in trigger function. Check expression part starting from "),"gt")}>10".

    So i tried to add "{}" arround the item :

    Code:
    {Remote_Hosts:PingSecAvg.sh[1,{IPADDRESS}].count(#20,[B]{[/B]Remote_Hosts:PingSecAvg.sh[1,{IPADDRESS}].avg(3600)[B]}[/B],"gt")}>10
    but then i got this error :
    Incorrect closing parenthesis in trigger expression. Check expression part starting from "")}>10".

    Am i actually too blind to see an obvious typing error on parenthesis or can't i call the function "avg" as parameter of the function count? If so there is a way to do that with a single trigger and a single item ?

    Thanks for taking time
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    I doubt that you can use nested functions.
    You may want to try complete function definitions and do tha maths later:

    (({item1.function1} > 3600) && (item1.function2} < 12345)) > 789
    Last edited by steveboyson; 31-03-2014, 20:53.

    Comment

    • Spikedammage
      Junior Member
      • Dec 2012
      • 4

      #3
      Thanks for your reply steve!

      Indeed i think you are right about nested functions. I tried few syntax but i can't make it works.

      I'm gonna check this out when i have some free time

      regards

      Comment

      Working...