Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-28-2008, 03:31 PM   #1
LQ Newbie
Registered: Apr 2008
Posts: 13

Rep: Reputation: 1
snmp - nagios wont detect service status change

I am monitoring an APC UPS' Basic Output Status (on-line / off-line - using battery)

Here is a copy of my command:
snmp_ups_stat $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o . -w 3 -c 4 -l 'UPS Status'

I can unplug the UPS and the status will change from 2 (on-line) to 3 (off-line):
iso. (from Nagios' service detail webpage)

but the status remains OK:
Current Status: OK (for 0d 17h 4m 48s)
Status Information: UPS Status OK - 3
Performance Data: iso.

Am I doing something wrong here?
Old 06-02-2008, 04:12 AM   #2
LQ Newbie
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
I'm having a very similar problem.

I use a service with the following command:

check_device!-H 217.x.x.x-C nxxxxxca -o ifOperStatus.xxxx

Everything appears to work fine. Both from within Nagios and from the Bash shell. However, when I temporarily force the line down, there is no change as illustrated in the following images:

Am I making a obvious error? I use Centreon to configure Nagios but I doubt this has any effect on the actual functionality.

Thanks in advance!
Old 06-03-2008, 12:34 PM   #3
LQ Newbie
Registered: Apr 2008
Posts: 13

Original Poster
Rep: Reputation: 1
I figured it out!

I hope this helps you, too.
In my listing of different status types for the UPS, it begins with the number 1: 1=unknown, 2=online, 3=offline, etc. With SNMP, it begins with the number 0 (there is an offset by -1). So SNMP sees it as 0=unknown, 1=online, 2=offline, etc.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
nagios + snmp aeby Linux - Server 3 08-29-2009 11:15 PM
How to change the snmp string in nagios monitoring tool aneeshn Linux - General 1 11-11-2007 06:23 AM
Shown Invalid Service Status Value using Nagios sureshkumar.repaka Programming 1 04-19-2007 05:34 AM
Nagios and SNMP Deaclen Linux - Software 1 02-28-2007 09:12 AM
Using SNMP in NAGIOS Bzw Linux - Networking 3 12-06-2004 07:13 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration