cjunior_138458
Feb 16, 2016Altostratus
How to: iCall triggered on monitor status changes
Hi experts, I need trigger a script regarding the objects status changes.
Is there an best way to do this without the need to change the user_alert.conf? My approuch:sys icall handler triggered network_upd_handler {
script network_upd_script
subscriptions {
OBJECT_STATUS {
event-name CHANGE_STATUS_EVENT
}
}
}
sys icall script network_upd_script {
app-service none
definition {
exec /bin/bash /var/tmp/update.sh
}
description none
events none
}
user_alert.conf
alert NETWORKMAP_UPDATE ".*monitor status.*" {
exec command=" tmsh generate sys icall event CHANGE_STATUS_EVENT"
}
I thank you!