[Nagiosplug-devel] [ nagiosplug-New Plugins-940139 ] check Network UPS Tools daemon

SourceForge.net noreply at sourceforge.net
Thu Apr 22 09:12:14 CEST 2004


New Plugins item #940139, was opened at 2004-04-22 18:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=541465&aid=940139&group_id=29880

Category: Perl plugin
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Fabio (blaxwan)
Assigned to: Nobody/Anonymous (nobody)
Summary: check Network UPS Tools daemon

Initial Comment:
I found that check_ups doesn't work with nut 2.0
(www.networkupstools.org) so I wrote this simple perl
plugin for monitoring my ups.
I hope it may be useful to someone else.
The plugin simply contact the upsd on the specified (or
default)
port, logins to the specified ups and ask for
ups.status variable
It reports:
- OK when the ups is running on AC power
- WARNING when the ups is running on battery or has
some minor trouble
- CRITICAL when the ups is running low on battery or is
not running at all

I have it in "production" since last week, no problems
at all......it's too simple for fail!

Thanks

P.S. I don't know exactly which files to patch/diff for
installation, here is the patch for command.cfg.in

--- command.cfg.in.backup	2004-04-20 17:10:28.000000000
+0200
+++ command.cfg.in	2004-04-20 17:11:52.000000000 +0200
@@ -91,6 +91,7 @@ command[check_procs]=@libexecdir@/check_
 command[check_procs_zombie]=@libexecdir@/check_procs
-w $ARG1$ -c $ARG2$ -s Z
 command[check_procs_httpd]=@libexecdir@/check_procs -w
5:$ARG1$ -c 1:$ARG2$ -C httpd
 command[check_vsz]=@libexecdir@/check_vsz -w 8096 -c
16182 -C httpd
+command[check_nut]=@libexecdir@/check_nut -H
$HOSTADDRESS$ -u $ARG1$ -l $ARG2$ -p $ARG3$ -P $ARG4$
 
 # An example of using check_by_ssh as an active
service check
 command[ssh_disk]=@libexecdir@/check_by_ssh -H
$HOSTADDRESS$ -C '@libexecdir@/check_disk -w 85% -c 95%
-p $ARG1$'

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=541465&aid=940139&group_id=29880




More information about the Devel mailing list