The attached scripts will log each unique device that sends a message to Kiwi into a dictionary and then alert you when a device has not sent a message within a specified number of seconds.
- It won't begin checking each device until the device has sent at least one message in.
- Threshold value is configurable by device IP, as well as allowing a default value.
- Interval value to keep nagging to a minimum when a device is out of commission.
- Script is divided in two to provide multiple monitoring options:
- Monitor via scheduled Run-Script Action.
- Monitor via Keep-Alive messages Run-Script Action.
- All-in-One option to monitor status every time a message is received.
There are two scripts in the attached zip, the first script can be used as an all-in-one script if the bottom section is uncommented.
Version 3 fixes another bug in the all-in-one script option. The script was not pulling the last report age out of the dictionary to compare against interval causing an overflow so if you un-commented that section, the script would just error out and never successfully run.
In version 1.1 I've corrected the e-mail blast when using the all-in-one script option. There is now an interval setting, so if you have a threshold of 600 seconds and an interval setting of 300 seconds, the delinquent device would send an alert after 10 minutes of no activity and then alert every 5 minutes thereafter until the device responds again.
Also, be sure to read the comments in the script, as some basic editing for the alerts is necessary. You'll need to specify your alert settings, it defaults to 10 minutes. You also need to specify the e-mail settings within the script or it will not be able to alert you.
Don't forget to rate/like/share, etc... if you find the scripts useful.