<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">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).<br>
<br>
If these return "unknown", it means upsd is no longer monitoring
the UPS. As long as you get data, upsd is working.<br>
<br>
PS: as an example, this is my check for the status: <br>
/usr/bin/perl -w $USER$/check_nut_plus -d $ARG1$@$HOSTADDRESS$ -v
'ups.status=c!~^OL'<br>
<br>
HTH,<br>
Dan Craciun<br>
<br>
On 4/1/2017 9:00 PM, Spike wrote:<br>
</div>
<blockquote
cite="mid:CAPE6YbSFc+M9qXY7eUhqy5jt_Rvfr5dXQQxqcXHf4beSPCkmEA@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div dir="ltr">Dear all,
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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].</div>
<div><br>
</div>
<div>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 <a
moz-do-not-send="true" href="mailto:eaton5s@127.0.0.1">eaton5s@127.0.0.1</a>
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.</div>
<div><br>
</div>
<div>Is there any command I can run that will confirm if upsmon
is correctly connected?</div>
<div><br>
</div>
<div>thanks,</div>
<div><br>
</div>
<div>Spike</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Nut-upsuser mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nut-upsuser@lists.alioth.debian.org">Nut-upsuser@lists.alioth.debian.org</a>
<a class="moz-txt-link-freetext" href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser</a></pre>
</blockquote>
<br>
</body>
</html>