ZABBIX Forums  
  #1  
Old 27-04-2012, 16:51
allenb_1121 allenb_1121 is offline
Junior Member
 
Join Date: Apr 2012
Location: Tuscaloosa, Alabama, USA
Posts: 3
Default 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.
Reply With Quote
  #2  
Old 30-04-2012, 12:39
netmon netmon is offline
Member
 
Join Date: Feb 2012
Posts: 30
Default

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 at 12:41.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:34.