Re: [Nagios-users] check_snmp output unit conversion

2011-07-15 Thread Mark Nipper
On 14 Jul 2011, Mark Nipper wrote:
 $ check_snmp -H 172.16.74.130 -P 1 -C public -o 
 .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 20 -c 205000
 SNMP WARNING - *204000* | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=204000 

To answer my own stupid question, the obvious form should
look something like:
---
$ check_snmp -H 172.16.74.130 -P 1 -C public -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 
-w 205000: -c 203000:
SNMP WARNING - *204000* | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=204000 

Having said that, there's definitely an issue with
thresholds on at least some of the 1.4.15 packages available out
there as RPM's (like the current EPEL one), so make sure you're
not affected or you might be missing alerts.

And I'm still curious why the timetick to minute
conversion gets dropped in that output.  Anyone have a suggestion
for that?

-- 
Mark Nipper
ni...@bitgnome.net (XMPP)
+1 979 575 3193
-
I love deadlines. I like the whooshing sound they make as
they fly by.
 -- Douglas Adams

--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] check_snmp output unit conversion

2011-07-14 Thread Mark Nipper
On 31 Mar 2011, cas...@activenetwerx.com wrote:
 Well, I'm using 1.4.15 from rpmforge on rhel and it works, what can I say:)

I'm using the EPEL version of the same packages and it's
not working in any way that I can divine.  I ran across this
post:
---
http://permalink.gmane.org/gmane.network.nagios.plugins/4971

basically indicating that some of the 1.4.15 packages are
definitely broken.  I've installed the latest version listed in
that thread which is from 29 Apr 2011, which seems to partially
work, but maybe not in any useful way.

Some examples:
---
$ check_snmp -H 172.16.74.130 -P 1 -C public -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0
SNMP OK - Timeticks: (204000) 0:34:00.00 | 
$ check_snmp -H 172.16.74.130 -P 1 -C public -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 
-w 203999 
SNMP WARNING - *204000* | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=204000 
$ check_snmp -H 172.16.74.130 -P 1 -C public -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 
-w 204001
SNMP OK - 204000 | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=204000 
$ check_snmp -H 172.16.74.130 -P 1 -C public -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 
-w 20 -c 205000
SNMP WARNING - *204000* | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=204000 
---

So, am I to conclude that things haven't entirely been
fixed even in this latest release of 1.4.15?  And why does
specifying thresholds stop the unit conversion in the output?

My primary concern is that the threshold values seem to
be inverted and that there is no logical way to specify your own
thresholds based on this.

-- 
Mark Nipper
ni...@bitgnome.net (XMPP)
+1 979 575 3193
-
Objective journalism is one of the main reasons American
politics has been allowed to be so corrupt for so long.  You
can't be objective about Nixon.
 -- Hunter S. Thompson in an interview for The Atlantic

--
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on Lean Startup 
Secrets Revealed. This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] check_snmp output unit conversion

2011-03-30 Thread Cameron Camp
I'm running a command like:

./check_snmp -H 1.2.3.4 -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 15 -c 5 -l
'Runtime Remaining' -u 'Minutes'

on an APC UPS monitoring card, which outputs in seconds like:

SNMP CRITICAL - Runtime Remaining *132000* Minutes | Runtime
Remaining=132000

which is 22 minutes. If I divide the output by 6000 I get 22, how would
I adjust the output to give me this? I could do it with bash piping, but
suspect there's a better way to do it (and it might break something with
check_snmp command and the rest of nagios).

thx, 
Cameron


--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] check_snmp output unit conversion

2011-03-30 Thread Joseph L. Casale
./check_snmp -H 1.2.3.4 -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 15 -c 5 -l
'Runtime Remaining' -u 'Minutes'

on an APC UPS monitoring card, which outputs in seconds like:

SNMP CRITICAL - Runtime Remaining *132000* Minutes | Runtime
Remaining=132000

which is 22 minutes. If I divide the output by 6000 I get 22, how would
I adjust the output to give me this? I could do it with bash piping, but
suspect there's a better way to do it (and it might break something with
check_snmp command and the rest of nagios).

What version of check_snmp? Mine is current and yields expected data.
jlc

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] check_snmp output unit conversion

2011-03-30 Thread Cameron Camp
./check_snmp -H 1.2.3.4 -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 15 -c 5
-l
'Runtime Remaining' -u 'Minutes'
SNMP CRITICAL - Runtime Remaining *132000* Minutes | Runtime
Remaining=132000

which is 22 minutes. 

What version of check_snmp? Mine is current and yields expected data.
jlc

packages listed below from Debian Squeeze standard repos

Nagios3 3.2.1
nagios_plugins 1.4.15
check_snmp 1.4.15

thx,
Cameron



--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] check_snmp output unit conversion

2011-03-30 Thread Cameron Camp
./check_snmp -H 1.2.3.4 -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 15 -c 5
-l
'Runtime Remaining' -u 'Minutes'
SNMP CRITICAL - Runtime Remaining *132000* Minutes | Runtime
Remaining=132000

which is 22 minutes. 

What version of check_snmp? Mine is current and yields expected data.
jlc

packages listed below from Debian Squeeze standard repos

Nagios3 3.2.1
nagios_plugins 1.4.15
check_snmp 1.4.15

what is strange is that it converts when I have no -w or -c
./check_snmp -H 1.2.3.4 -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0
: SNMP OK - Timeticks: (138000) 0:23:00.00 |

but when I include warn/critical it shows seconds again, no matter
whether I use seconds like 

./check_snmp -H 1.2.3.4 -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 10 -c
8
: SNMP CRITICAL - *138000* | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=138000

or minutes like
./check_snmp -H 1.2.3.4 -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 15 -c 10
: SNMP CRITICAL - *132000* | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=132000

Thx,
Cameron




--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] check_snmp output unit conversion

2011-03-30 Thread Joseph L. Casale
check_snmp 1.4.15

Well, I'm using 1.4.15 from rpmforge on rhel and it works, what can I say:)

--
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
___
Nagios-users mailing list
Nagios-users@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


[Nagios-users] check_snmp output

2009-04-22 Thread shadih rahman
All,
   I want to show the result of check_snmp in a certain way.  For example if
I am doing a nominal current check on Liebert ups, the snmp query will
return 506 as result.  However this actauly means 50.6 amp.  Is there any
way to control the output on check_snmp plugin.  I am aware of the -u
option but I am not sure if I can use this to achieve the desired result I
am looking for.  Thanks

-- 
Cordially,
Shadhin Rahman
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p___
Nagios-users mailing list
Nagios-users@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

Re: [Nagios-users] check_snmp output

2009-04-22 Thread Marc Powell

On Apr 22, 2009, at 8:46 AM, shadih rahman wrote:

 All,
I want to show the result of check_snmp in a certain way.  For  
 example if I am doing a nominal current check on Liebert ups, the  
 snmp query will return 506 as result.  However this actauly means  
 50.6 amp.  Is there any way to control the output on check_snmp  
 plugin.  I am aware of the -u option but I am not sure if I can  
 use this to achieve the desired result I am looking for.  Thanks

There's no facility for munging the response data received via SNMP  
since it can be quite variable, ranging from numeric data to ip  
addresses to string data and many others. You can add a label (-l)  
(i.e. -l 'Amperage is' results in 'Amperage is OK- 506') and/or units  
(-u) (i.e. '-u amp' results in 'OK - 506 amp').

You could create a simple wrapper script that runs check_snmp, grabs  
it's output and return code, munges the output, and returns both back  
to nagios as the plugin would.

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Nagios-users mailing list
Nagios-users@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


Re: [Nagios-users] check_snmp output

2009-04-22 Thread Marc Powell
Please always respond on list --

On Apr 22, 2009, at 10:18 AM, shadih rahman wrote:

 Marc,
  Can you please give me some direction for the wrapper script.   
 Do you mean to capture the output and then do some type search and  
 replace on the string?

Yes, exactly. You'll also need to capture the check_snmp exit code and  
have your wrapper exit with that same code.

--
Marc


--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
Nagios-users mailing list
Nagios-users@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