[Nut-upsuser] how do you test (nagios) that upsmon is connected?
roger at rogerprice.org
Sat Apr 1 20:54:34 UTC 2017
On Sat, 1 Apr 2017, Stuart Gathman wrote:
> On 04/01/2017 03:14 PM, Dan Craciun wrote:
>> On my Nagios monitoring system I use check_nut_plus (that in turn
>> calls upsc) to monitor the status (ups.status), load (ups.load),
>> battery charge (battery.charge) and runtime (battery.runtime).
>> If these return "unknown", it means upsd is no longer monitoring the
>> UPS. As long as you get data, upsd is working.
> That's great, but Spike wants to know whether *upsmon* is working. He
> already has a way to check that upsd is working.
How about using a dummy ups to set up a regular end-to-end heart beat.
As long as the heart beats, there is no news, but if it stops,
upssched-cmd sends out an e-mail or other warning.
In ups.conf, add
driver = dummy-ups
port = heartbeat.dev
desc = "Dummy ups sends heart beat to upssched-cmd"
In heartbeat.dev, write
In upsmon.conf, write
NOTIFYFLAG REPLBATT SYSLOG+EXEC
In upssched.conf, add
# Heatbeat from dummy ups every 5 minutes, re-start 6 minute timer
AT REPLBATT heartbeat CANCEL-TIMER heatbeat-timer
AT REPLBATT heartbeat START-TIMER heatbeat-timer 360
In upssched-cmd, if heatbeat-timer completes, then send "UPS heatbeat
failure" message to sysadmin.
If this works, let me know, and I will use it myself :-)
It would be nice to have a HEARTBEAT status instead of using REPLBATT.
More information about the Nut-upsuser