# Triggers¶

Warning

This is currently in Beta. DO NOT use in production.

## Define and use triggers¶

A trigger object is something that can be called after a “change” on an object. It’s a bit like Zabbix trigger, and should be used only if you need it. In most cases, direct check is easier to setup :)

Here is an example that will raise a critical check if the CPU is too loaded:

Note

If your trigger is made to edit output add the trigger_broker_raise_enabled parameter into the service definition. If not, Shinken will generate 2 broks (1 before and 1 after the trigger). This can lead to bad data in broker module (Graphite)

define service{
use                             local-service         ; Name of service template to use
host_name                       localhost
trigger_name                    simple_cpu
trigger_broker_raise_enabled    1
}


Then define your trigger in etc/trigger.d/yourtrigger.trig. here the file is simple_cpu.trig

try:

else:
except:



Versions
latest
stable
branch-1.4
2.4.1
2.2
2.0.3
1.4.2