Example 7.3. Alert configuration with meta-attributes
<configuration> <alerts> <alert id="my-alert" path="/path/to/my-script.sh"> <meta_attributes id="my-alert-attributes"> <nvpair id="my-alert-attributes-timeout" name="timeout" value="15s"/> </meta_attributes> <recipient id="my-alert-recipient1" value="someuser@example.com"> <meta_attributes id="my-alert-recipient1-attributes"> <nvpair id="my-alert-recipient1-timestamp-format" name="timestamp-format" value="%D %H:%M"/> </meta_attributes> </recipient> <recipient id="my-alert-recipient2" value="otheruser@example.com"> <meta_attributes id="my-alert-recipient2-attributes"> <nvpair id="my-alert-recipient2-timestamp-format" name="timestamp-format" value="%c"/> </meta_attributes> </recipient> </alert> </alerts> </configuration>
my-script.sh
will get called twice for each event, with each call using a 15-second timeout. One call will be passed the recipient someuser@example.com
and a timestamp in the format %D %H:%M
, while the other call will be passed the recipient otheruser@example.com
and a timestamp in the format %c
.