[Nut-upsuser] how do you test (nagios) that upsmon is connected?

Dan Craciun dany.craciun at gmail.com
Sat Apr 1 19:14:41 UTC 2017


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.

PS: as an example, this is my check for the status:
/usr/bin/perl -w $USER$/check_nut_plus -d $ARG1$@$HOSTADDRESS$ -v
'ups.status=c!~^OL'

HTH,
Dan Craciun

On 4/1/2017 9:00 PM, Spike wrote:
> Dear all,
>
> I got nut going on one machine as standalone and on another 2 as
> master/slave and would like to add some checks to nagios to make sure
> that things are in order.
>
> Most of the checks I've seen out there use upsc to check the ups. This
> is a step forward compared to no monitoring, however as far as I can
> tell it doesn't really address what I think is a critical point:
> upsmon is actually monitoring the ups [and will shut down the box if
> needed].
>
> I looked at the upsd and upsmon man pages, but can't see anything like
> a "status" command that will show me if the connection is healthy (I
> noticed that when I restart the daemons I get a log line saying
> "Communications with UPS eaton5s at 127.0.0.1 <mailto:eaton5s at 127.0.0.1>
> established", but I can't seem to find a place to access that). I
> could in theory check if the port is in use/ESTABLISHED, lsof -i:3493,
> but it's not great.
>
> Is there any command I can run that will confirm if upsmon is
> correctly connected?
>
> thanks,
>
> Spike
>
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170401/72be4e9f/attachment.html>


More information about the Nut-upsuser mailing list