We recently enabled BGP Peer Session Monitoring (BGP Manager) in our environment. The alarm is working fine, but not seeing the "S 1" (The {S 4} session with peer {S 5} has gone from established to {T bgpPeerState 3}. The LastError is {S 1}.) value in the event.
Release : All Supported Releases
Component : SPCAEM: Events and Alarms
The BGP-MIB reports the error code as an Octet, not a String.
Edit the default Event Format file and change {S 1} to octet {O 1}
$SPECROOT/SG-Support/CsEvFormat\Event00220013_en_US
Change from {d "%w- %d %m-, %Y - %T"} - The {S 4} session with peer {S 5} has gone from established to {T bgpPeerState 3}. The LastError is {S 1}. (event [{e}])
To {d "%w- %d %m-, %Y - %T"} - The {S 4} session with peer {S 5} has gone from established to {T bgpPeerState 3}. The LastError is {O 1}. (event [{e}])
The value is polled from the BGP4 -MIB. The lastError is read from the BGP4 mib (or in some cases Cisco's BGP4 mib).
bgpPeerLastError:
OBJECT-TYPE SYNTAX OCTET STRING (SIZE (2 )) ACCESS read-only STATUS mandatory
DESCRIPTION "The last error code and subcode seen by this peer on this connection. If no error has occurred, this field is zero. Otherwise, the first byte of this two byte OCTET STRING contains the error code; the second contains the subcode."
::= { bgpPeerEntry 14 } -- 1.3.6.1.2.1.15.3.1.14