Help with newer check_snmp plug-in
Subhendu Ghosh
sghosh at sghosh.org
Wed Apr 2 05:30:20 CEST 2003
On Tue, 1 Apr 2003, Mark Holm wrote:
> I just upgraded my plug-ins to the newly released 1.3.0 versions and my
> checks that used check_snmp broke. I've been playing with this all afternoon
> and can't find a combination that works the way it did before. Can somebody
> help me with Syntax please?
>
> All this check does is check to see if an interface is up on our Cisco
> router. The command that I had before was:
>
> define command {
> command_name check_router_link
> command_line $USER1$/check_snmp $HOSTADDRESS$ -c $ARG2$ -o
> interfaces.ifTable.ifEntry.ifOperStatus.$ARG1$ -e SUBSTR -s up -cv down
> }
>
> >From what I can figure out so far the syntax changes are:
>
> * Add a -H for the address
> * community string changed to -C
> * the string syntax now does whole string or SUBSTR so the -e value went
> away.
>
> But what I cannot get is how I specify the correct or incorrect values as
> per the -cv option above?
>
> What I have so far is:
>
> define command {
> command_name check_router_link
> command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG2$ -o
> interfaces.ifTable.ifEntry.ifOperStatus.$ARG1$ -s up
> }
>
> Any help greatly appreciated!
>
> markh
Two different answers:
1. Have you tried the check_ifoperstatus and check_ifstatus plugins?
The first checks a particular interface noted either by the ifIndex
(-k) or by ifDescr (-d)
The second checks for status of all non-admin down interfaces on a
device.
Should simplify your life little.
2. check_snmp - (-s) does an exact match of full string, (-r) does a regex
match (full or substring)
If the match fails in either case, the return value is critical
As a result (-cv) is no longer supported)
--
-sg
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
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
More information about the Users
mailing list