The speak notification type would be more useful if it could be run continually while a device state is down.
If a router goes down, I would like The Dude to speak the name of the router every 30 seconds, until it’s up again.
Is there any way to achieve that?
As of now, The Dude will speak the name of the router a configurable number of times, whether it’s still down or not.
Until I am able to do this with The Dude only, the following procedure seems to work:
- create a notification with type=syslog and text=“[Device.Status] [Device.Name]” (remove the quotes).
- either tail the logfile or bind a script to the syslog port.
- have your script keep a list of hosts that are down.
- use espeak to speak the name of the down hosts every 30 seconds.
eSpeak: fast, small, FreeBSD support, multilingual
It would be more reliable to fetch the list of hosts that are down directly from The Dude, but I haven’t looked into how to do that yet.
Currently, if the script is restarted, there is no way for it to know which hosts are down. Fortunately, restarts are infrequent enough that it shouldn’t be a problem.
Ideas?