cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2108
Views
0
Helpful
3
Replies

SNMP: Changing Textual-Convention syntax integers

marcjone
Level 1
Level 1

Hi all

I'm doing some work on a Trap collector and I would like to know if it is possible to change the format of the Trap by editing the MIB file

For example, we are seeing the following trap coming in from the CISCO-HSRP-MIB:

cHsrpMIBNotifications.cHsrpStateChange.cHsrpGrpStandbyState(6)

Now, I can see from the mib file that the value '6' relates to the following textual conventions:

SYNTAX INTEGER {

initial(1),

learn(2),

listen(3),

speak(4),

standby(5),

active(6)

However, the user's who will be monitoring these traps are not going to have the SNMP knowledge to be able to make sense of the value 6 and understand that this means that the devices' standy-state is 'active'

Is is possible to edit the textual conventions in the mib so that the messages forwarded from the trap collector will have meaning without needing to be decoded ?

I am not sure whether string values can be applied in this way ...

Ideally, i'd like to get something like:

cHsrpMIBNotifications.cHsrpStateChange.cHsrpGrpStandbyState(6 = Active)

Any ideas or suggestions would be greatly appreciated

Many thanks in advance for any help

Marcus

1 Accepted Solution

Accepted Solutions

nhabib
Level 9
Level 9

You shouldn't have to edit the MIBs.

cHsrpGrpStandbyState is the varbind that is included in the trap cHsrpStateChange

When the trap is sent, it's all numeric and it's up to the NMS to map the trap, and the varbind to some text

In the example below, I have a trap from the CISCO-SYSLOG-MIB. Take a look at where it says notice(6). Your NMS should do the same (translate the value of 6 to Active).

Sep 1 11:01:13 nms-server2 snmptrapd[66961]: 2005-09-01 11:01:13 nms-2610a [14.32.100.5] (via UDP: [14.32.100.5]:55106) TRAP, SNMP v1, community public CISCO-SYSLOG-MIB::ciscoSyslogMIBNotificationPrefix Enterprise Specific Trap (CISCO-SYSLOG-MIB::clogMessageGenerated) Uptime: 18 days, 17:55:27.17 CISCO-SYSLOG-MIB::clogHistFacility.34217 = STRING: OSPF CISCO-SYSLOG-MIB::clogHistSeverity.34217 =

INTEGER: notice(6) CISCO-SYSLOG-MIB::clogHistMsgName.34217 = STRING: ADJCHG CISCO-SYSLOG-MIB::clogHistMsgText.34217 = STRING: Process 29, Nbr 14.32.12.13 on Serial1/0 from INIT to 2WAY, 2-Way Received CISCO-SYSLOG-MIB::clogHistTimestamp.34217 = Timeticks: (161972716) 18 days, 17:55:27.16

View solution in original post

3 Replies 3

nhabib
Level 9
Level 9

You shouldn't have to edit the MIBs.

cHsrpGrpStandbyState is the varbind that is included in the trap cHsrpStateChange

When the trap is sent, it's all numeric and it's up to the NMS to map the trap, and the varbind to some text

In the example below, I have a trap from the CISCO-SYSLOG-MIB. Take a look at where it says notice(6). Your NMS should do the same (translate the value of 6 to Active).

Sep 1 11:01:13 nms-server2 snmptrapd[66961]: 2005-09-01 11:01:13 nms-2610a [14.32.100.5] (via UDP: [14.32.100.5]:55106) TRAP, SNMP v1, community public CISCO-SYSLOG-MIB::ciscoSyslogMIBNotificationPrefix Enterprise Specific Trap (CISCO-SYSLOG-MIB::clogMessageGenerated) Uptime: 18 days, 17:55:27.17 CISCO-SYSLOG-MIB::clogHistFacility.34217 = STRING: OSPF CISCO-SYSLOG-MIB::clogHistSeverity.34217 =

INTEGER: notice(6) CISCO-SYSLOG-MIB::clogHistMsgName.34217 = STRING: ADJCHG CISCO-SYSLOG-MIB::clogHistMsgText.34217 = STRING: Process 29, Nbr 14.32.12.13 on Serial1/0 from INIT to 2WAY, 2-Way Received CISCO-SYSLOG-MIB::clogHistTimestamp.34217 = Timeticks: (161972716) 18 days, 17:55:27.16

Thanks Nadim - I'll get onto the NMS vendor and see if they can suggest a method for translating the values into text

I really appreciate your help :)

Have a great week-end Marcus.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: