[Nagiosplug-help] Check_snmp and regex help request

Subhendu Ghosh sghosh at sghosh.org
Tue Jun 3 07:13:14 CEST 2003


The regex option is not working at the moment.

work-around:

It might be easier if if you try -w and -c with a "-m :"
The -m option will force your to use oids not object names
-w :0 (warn for values zero or less)
-c 3: ( critical for values 3 or more)

check_snmp -H c4k -C comm -o .1.3.6.1.4.1.9.x.x.x -w :0 -c 3: -m : 

-sg


On Tue, 3 Jun 2003, Pietro Bandera wrote:

> 
> Hi all
> 
> I got this command that check our cisco4000 port status, 
> 
> 
> command[check_Cisco4000_PortLinkStatus]=/usr/local/netsaint/libexec/chec
> k_snmp $HOSTADDRESS$ -C $ARG1$ -o
> enterprises.cisco.workgroup.ciscoStackMIB.portGrp.portTable.portEntry.po
> rtLinkFaultStatus.$ARG2$.$ARG3$ -l StatoDuplex -s "noFault(1)"
> 
> That is based on this oid
> 
> portLinkFaultStatus OBJECT-TYPE
>         SYNTAX        INTEGER {
>                                 noFault(1),
>                                 nearEndFault(2),
>                                 nearEndConfigFail(3),
>                                 farEndDisable(4),
>                                 farEndFault(5),
>                                 farEndConfigFail(6),
>                                 notApplicable(7)
>                               }
>         MAX-ACCESS    read-only
>         STATUS        current
>         DESCRIPTION   "Specifies additional link fault status on a
> gigabit
>                       link.
> 
>                       noFault:
>                               Link is up and operational.
>                       nearEndFault:
>                               The port is enabled but there is no GBIC
>                               present or the local port cannot
> synchronize
>                               with the remote end.
>                       nearEndConfigFail:
>                               The local port has detected a
> configuration
>                               mismatch with the remote end.
>                       farEndDisable:
>                               The far end is in the disabled state.
>                       farEndFault:
>                               The remote port is cannot synchronize.
>                       farEndConfigFail:
>                               The remote port has detected a
> configuration
>                               mismatch with the local end.
>                       notApplicable:
>                               Link fault status is not applicable on
> this
>                               port."
>         ::= { portEntry 22 }
> 
> 
> 
> By now, the command have not a really good sense, because it should
> generate an OK state if is in "noFault" or "nearEndFault" state and not
> only if it is in "noFault" state as now.
> 
> 
> 
> I have tried to change it using the "-r" or "-R" option instead of "-s"
> but i think i miss something.
> 
> Here there is the new command
> command[check_Cisco4000_PortLinkStatus]=/usr/local/netsaint/libexec/chec
> k_snmp $HOSTADDRESS$ -C $ARG1$ -o
> enterprises.cisco.workgroup.ciscoStackMIB.portGrp.portTable.portEntry.po
> rtLinkFaultStatus.$ARG2$.$ARG3$ -l StatoDuplex -r
> "/noFault(1)|nearEndFault(2)/"
> 
> But with this sentence it always gives me a critical state.
> 
> I think i miss something in the regex sintax.
> 
> Could you help me?
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: eBay
> Get office equipment for less on eBay!
> http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 

-- 







More information about the Help mailing list