SNMPTT to Nagios
Posted: Wed Oct 23, 2013 7:53 am
Hey,
I'm trying to configure SNMP Traps for a Cisco MIB.
The MIB contains OID's that integrate both Up/Down states.
Unfortunately I'm unable to understand how to set apart OK/Warning states accordingly.
The trap itself generates a number of variables, based on them I could potentially understand if the link is Up or Down.
I currently have in my snmptt.conf file:
Obviously the LinkState $6 variable represents Up/Down states:
Can I use this variable to decide on the Nagios service state that is passed on to the passive service?
Also, can I also use the "Variables" info that was converted from the MIB for the Format and Service Status data?
IE - Replace LinkReason $7 (which holds an integer) with it's data:
Thanks.
I'm trying to configure SNMP Traps for a Cisco MIB.
The MIB contains OID's that integrate both Up/Down states.
Unfortunately I'm unable to understand how to set apart OK/Warning states accordingly.
The trap itself generates a number of variables, based on them I could potentially understand if the link is Up or Down.
I currently have in my snmptt.conf file:
Code: Select all
FORMAT SequenceNumber $1 : SourcePC $3 : AdjacentPC $4 : DisplayName $5 : LinkState $6 : LinkReason $7 : LinkTestResult $8
EXEC /usr/local/bin/snmptraphandling.py "$r" "Linkset Status" "$s" "$@" "" "$Fz"Code: Select all
6: cgspLinkState
Syntax="INTEGER"
1: available
2: failed
3: shutdown
4: unavailableAlso, can I also use the "Variables" info that was converted from the MIB for the Format and Service Status data?
IE - Replace LinkReason $7 (which holds an integer) with it's data:
Code: Select all
7: cgspLinkReason
Syntax="INTEGER"
0: unknown
1: changeOverInProgress
10: t3Timeout
11: t6Timeout
12: t7Timeout
13: provingFailure
14: protocolErrorBsn
15: protocolErrorFib
16: protocolErrorSin
17: protocolErrorLssu
18: peerNotReady
19: communicationLost
2: mgmtDisconnectRequest
20: noListenPosted
21: bufferNotAvailable
22: cardRemoved
23: cardInserted
24: falseLinkCongestion
25: configDownload
26: localInhibit
27: localUninhibit
28: remoteInhibit
29: remoteUninhibit
3: linkAlignmentLost
30: localBlocked
31: localUnBlocked
32: remoteBlocked
33: remoteUnblocked
34: linkRestored
35: linkTestFailure
4: connectionLost
5: localDisconnect
6: remoteDisconnect
7: suermFailure
8: t1Timeout
9: t2Timeout