Forum Discussion
hooleylist
Mar 23, 2012Cirrostratus
Hi Ed,
Thanks for the great summary. Custom alertd scripts came up recently for a customer scenario. In a quick test on 10.2.3, it does look like you can have multiple exec commands for one alert:
cat /config/user_alert.conf
alert user_alert.conf_test "my custom trigger string" {
exec command="echo 'echo test1 from user_alert.conf'>> /var/log/ltm";
exec command="echo 'echo test2 from user_alert.conf'>> /var/log/ltm";
exec command="/var/tmp/script1.bash";
exec command="/var/tmp/script2.bash";
}
cat /var/tmp/script1.bash
!/bin/bash
echo "running $0" >> /var/log/ltm
generate a test log message
logger -p local0.info "my custom trigger string"
output written to /var/log/ltm
Mar 23 07:49:11 local/ve10a info root: my custom trigger string
echo test1 from user_alert.conf
echo test2 from user_alert.conf
running /var/tmp/script1.bash
running /var/tmp/script2.bash
I've requested to have your notes added to an AskF5 solution.
Thanks again,
Aaron