Announcement

Collapse
No announcement yet.

Is my trigger config correct?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Is my trigger config correct?

    First of all, I'm fairly new to Zabbix - moving over from a different monitoring setup to it, and so far I am very pleased. This is my first post here, so if I sound like a newbie, I am

    I am setting up some simple check triggers for a tcp port being open on a server. I have this working as expected, but I want to only have the trigger work if the port has not been responding for a certain number of seconds. (Doing some checks over a laggy connection that sometimes times out).
    Here is what I have come up with, just an example I was playing with only:

    The "Item" is set to check every 60 seconds, and I only want to be alerted if the tcp 22 has been unavailable for 300 seconds. (or I suppose I could say that I want it to alert only if it fails five checks, since 60 * 5 = 300 seconds). Either way, from my first glance at the config, this is what I came up with.
    Would this be correct?

    {UA OIT SSH Port 22 Only:ssh,22.last(300)}=0


    Thanks!
    Allen B.

    #2
    Hi Allen,

    I think your trigger will not work as you expect it to work.

    The last function does not accept a 'seconds' parameter, with last you can get ONE value. either the most recent (last collected value), that would be .last() .last(0) or .last(#1) or for example the 5th last value .last(#5).

    You can check the documentation for the different functions:
    Zabbix 2.0 Trigger Expressions
    Zabbix 2.0 Functions list
    Zabbix 1.8 Triggers


    There are several ways to achieve your goal, but I think the max function fits your needs best.

    {UA OIT SSH Port 22 Only:ssh,22.max(300)}=0
    or
    {UA OIT SSH Port 22 Only:ssh,22.max(#5)}=0

    The max function will show you the highest value in the period of time or number of values you specify.
    In your case that means, if the highest value within 300 seconds or 5th last values was 0, the trigger would go off(alert)!

    But you should note: This way you wouldn't get a notification if there are 4 failures out of 5 checks!
    Last edited by netmon; 30-04-2012, 12:41.

    Comment

    Working...
    X