check_acp_ups.pl status unknown??

Jon Lyons jlyons30 at yahoo.com
Wed Nov 19 23:17:20 CET 2003


Thanks for the reply, while I was debugging I added;
my $exitval     = 0;
To the script and everything started working, don't know why, but it works..... :)
 


Tedman Eng <teng at dataway.com> wrote:
Try this in your command line:
fwlogs# ./check_apc_ups.pl -H 10.128.16.9; echo "Exit code $?"

The exist code is how Nagios determines the status. The output is just
informational.

You should see something like this:
Output status: onLine Rem time: 0:41:00.00 Battery status: batteryNormal
Battery temp(C): 35 Battery repl: noBatteryNeedsReplacing Output load (%):
37 Diag result: OK
Exit code 3 <-- or some other number

The corresponding exit code to Nagios status is:
0 - okay
1 - warning
2 - critical
3 - unknown

If the exit code from command-line is different that Nagios's status when
run in the system, then check your check_command definition and
corresponding service definition.

If you're getting '3', try setting warning and critical thresholds?

If you're STILL getting '3' after that, then try checking each SNMP OID
using snmpget:
# snmpget -c community Host-IP OID

For OID, substitute each of these values:
example
# snmpget -c public 10.128.16.9 .1.3.6.1.4.1.318.1.1.1.4.1.1.0

upsBasicOutputStatus = ".1.3.6.1.4.1.318.1.1.1.4.1.1.0"
upsBasicBatteryStatus = ".1.3.6.1.4.1.318.1.1.1.2.1.1.0"
upsAdvInputLineFailCause = ".1.3.6.1.4.1.318.1.1.1.3.2.5.0"
upsAdvBatteryTemperature = ".1.3.6.1.4.1.318.1.1.1.2.2.2.0"
upsAdvBatteryRunTimeRemaining = ".1.3.6.1.4.1.318.1.1.1.2.2.3.0"
upsAdvBatteryReplaceIndicator = ".1.3.6.1.4.1.318.1.1.1.2.2.4.0"
upsAdvOutputLoad = ".1.3.6.1.4.1.318.1.1.1.4.2.3.0"
upsAdvTestDiagnosticsResults = ".1.3.6.1.4.1.318.1.1.1.7.2.3.0"


This should get you pointed in the right direction.


"Jon Lyons" wrote in message
news:20031117214451.81533.qmail at web21502.mail.yahoo.com...
> Hey,
> One last question about plugins, when I execute the check_apc_ups.pl
script fron the command line I get the response below, however nagios
returns the same info but return the status as unkown. The plugin
documention says the plgin should return a value of 0 for ok, but thats a
return code?
>
>
> fwlogs# ./check_apc_ups.pl -H 10.128.16.9
> Output status: onLine Rem time: 0:41:00.00 Battery status: batteryNormal
Battery temp(C): 35 Battery repl: noBatteryNeedsReplacing Output load (%):
37 Diag result: OK
> fwlogs#
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard





-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031119/c6401f46/attachment.html>


More information about the Users mailing list