PDA

View Full Version : Trigger depending on itself ?


Kai-Kai
29-06-2009, 09:51
Hello,

last week, we had a discussion around this topic, what about making the possibility to triggers to depend on its own state ?

To be more clear, have a look to this topic :
http://www.zabbix.com/forum/showthread.php?p=48156#post48156

In this one, it could be interesting to be able to do such a trigger :
{Template_Router:icmpping.sum(#3)}=0 | (THIS-TRIGGER.LAST_STATE=PROBLEM & {Template_Router:icmpping.sum(#3)}#3)

but I think it's impossible...

Is there a solution with the current version to do somethink like that or something like what is requested in the topic ?
If not, what about adding that in the next versions of zabbix ?

Thanks. :)

Kai-Kai
03-07-2009, 14:41
I've recently discovered (thanks to Calimero) that it's already a fonctionnality of Zabbix !

Official documentation, page 132.
"4.13.4.Hysteresis"


Sometimes a trigger must have different conditions for different states. For
example, we would like to define a trigger which would become TRUE when
server room temperature is higher than 20C while it should stay in the state until
temperature will not become lower than 15C.
In order to do this, we define the following trigger:
Example 1 Temperature in server room is too high
({TRIGGER.VALUE}=0&{server:temp.last(0)}>20)|
({TRIGGER.VALUE}=1&{server:temp.last(0)}>15)
Note use of macro {TRIGGER.VALUE}. The macro returns current trigger value.


It's exactly what I was asking for.
So, thanks, that's okay. :)

As far as my example is concerned, the solution is :
{Template_Router:icmpping.sum(#3)}=0 | ({TRIGGER.VALUE}=1 & {Template_Router:icmpping.sum(#3)}#3)

bashman
11-01-2010, 09:05
Thanks fcge for this post.

It resolved my problem.

http://www.zabbix.com/forum/showthread.php?t=15113&highlight=update+items