PDA

View Full Version : Trigger TIMER


vikty
30-01-2008, 09:34
Hi,
How can I configure a trigger to fire only between 08:00 and 23:00?

For example:
I have configured a trigger that fire when itemkey.last(0)=0, but between 23:00 and 08:00
the item have value zero, it is normal, therefore the trigger must not start in this hours...

How can I tell this to the trigger?

vikty
30-01-2008, 09:46
I have found the time function in the zabbic-doc and I have thought how to use:

({host1:cont.files.num.avg(#4)}=0)&({host1:cont.files.num.time(0)}>080000)&({host1:cont.files.num.time(0)}<230000)

Is It correct this idea?

Anyway zabbix tell me "Unknown function [time]" I use Zabbix-server 1.4.1
Doc: Zabbix Manual v1.4 Release 012

Could someone explain me?

vikty
30-01-2008, 10:12
Configure in the Action the "Time period in"

In This way The trigger go ON but the Action doesn't work if the time period is uncorrect.
it is good, but I prefer that trigger doesn't go ON if time is out of period..... so....

welkin
26-02-2008, 09:30
I have the same Problem. I also tried to change the "Action timeperiod" but if a Trigger triggers e.g. at night and the "Action Timeperiod" is set to only at daytime there will be no action executed when daytime is reached again.

Can you confirm that your trigger setup works ?

mfg
welkin

vikty
26-02-2008, 10:33
Yes, unfortunately it works in this way :(

Mainly I wanted not send a SMS at the nigth.... but I send the e-mail anyway

skogan
26-02-2008, 19:02
I'd set up a simple external script that will return 1 during the defined time period and 0 in all other time. Then, the Trigger will use that check in the condition.

vikty
27-02-2008, 17:29
I'd set up a simple external script that will return 1 during the defined time period and 0 in all other time. Then, the Trigger will use that check in the condition.

very nice :D

skogan
27-02-2008, 17:50
There is a catch in that solution, though. (lately it seems that there always is one :( )

Running external scripts is not a cheap operation under zabbix, so you wouldn't want to set up that script to run more than once. So, let's say you set it up as a data source in the localhost (zabbix server). In this case, all your triggers that reference this item will appear TWICE: once for the host being monitored and once for the localhost. The cause for that is that in Zabbix triggers are not owned by any hosts - only items are. Trigger membership is determined by the items mentioned in the trigger. A very annoying misfeature :(

Alexei
27-02-2008, 18:36
I have found the time function in the zabbic-doc and I have thought how to use:

({host1:cont.files.num.avg(#4)}=0)&({host1:cont.files.num.time(0)}>080000)&({host1:cont.files.num.time(0)}<230000)
Is It correct this idea?

Anyway zabbix tell me "Unknown function [time]" I use Zabbix-server 1.4.1
Doc: Zabbix Manual v1.4 Release 012

Could someone explain me?
The idea is absolutely correct. There is no message "Unknown function ..." in ZABBIX 1.4.x code. Are you sure you are running 1.4.x?

vikty
27-02-2008, 19:31
Yes,
I use the 1.4.1 version.

But Zabbix return me "unknown function"... anyway tomorrow I check again.


I have checked....
Zabbix-server version is 1.4.1
Frontend PHP is 1.4.1