[Nagiosplug-help] Check_snmp and regex help request
Pietro Bandera
pietrob at lansystems.it
Tue Jun 3 06:42:08 CEST 2003
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?
More information about the Help
mailing list