The simplest effective workaround I could come up with is tailing the syslog and playing a sound when grepping the string 'Gone into alert state'
And it works pretty well. At least enough for my basic needs.
For those who want to persue this road, here is what I've done:
1. Add a NOPASSWD: userid to the sudoers file for tailing syslog.
Code: Select all
User_Alias LOG = logadmin
Cmnd_Alias LOG_MAINT = /usr/bin/tail -f /var/log/messages
LOG ALL = NOPASSWD: LOG_MAINT
Code: Select all
sudo /usr/bin/tail -f /var/log/messages |
while true; do
if grep -q 'Gone into alarm state'
then aplay foo.wav
fi
done
Code: Select all
sudo -u logadmin /usr/local/bin/zm_alarm.sh
HTH.
Koos