RV: RV: snmptrapd & NOTIFICATION-LOG-MIB support

"Ivan Pozo" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
	Robert:

	I added the configuration missing in the snmpd.conf as the faq
explains, but the snmpdtrapd failed and a core file is generated when I
tried to execute the snmpwalk command (snmpwalk -v 1 -c public-traps
10.30.5.15:161 nlmLog). I activated the debugging mode with the "-D all"
option. I'm attaching parts of the debug file when the traps are received
and when the walk command was executed. I realized that the error "Variable
has bad type" is generated when the daemon is going down. I think or it must
have an issue when the trap is registered in the NOTIFICATION-LOG-MIB or it
must have a problem on the MIB definition.

	I appreciate your help. 

	Regard.

-----Mensaje original-----
De: Robert Story [mailto:[email protected]] 
Enviado el: Miércoles, 14 de Septiembre de 2005 01:51 p.m.
Para: Ivan Pozo
CC: 'Dave Shield'; [email protected]
Asunto: Re: RV: snmptrapd & NOTIFICATION-LOG-MIB support

On Wed, 14 Sep 2005 11:56:51 -0400 Ivan wrote:
IP> 	I suppose the call for querying the table with the snmptrapd
IP> context must be:
IP> 
IP> 	snmptable -v 2c -c administrators 10.30.5.15:161
IP> nlmLog.nlmLogTable.snmptrapd
IP> 
IP> 	Is that right?. Thanks for your help.

No. Contexts are a SNMPv3 concept. You can use community strings to map to
contexts for v1 and v2c. See:

	http://www.freesnmp.com/net-snmp/faqs/#trapdlog

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
      unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>  
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>

You are lost in a twisty maze of little standards, all different.
snmptrapd going down.txt (text/plain, 7.7 KB)
trace:  agentx/protocol.c, 1838:
dumph_recv:       VarBindList
trace:  agentx/client.c, 76:
agentx/subagent: synching input, op 0x01
trace:  snmp_api.c, 5216:
sess_read: not reading 4 (fdset ffbef630 set 0)
trace:  agentx/subagent.c, 948:
agentx/subagent: session 2a9a0 responded to ping
trace:  snmp_alarm.c, 249:
snmp_alarm: alarm 3 completed
trace:  snmp_api.c, 5630:
sess_select: for all sessions: 9 7 6 4 
trace:  snmp_api.c, 5216:
sess_read: not reading 9 (fdset ffbef9a8 set 0)
trace:  snmp_api.c, 5216:
sess_read: not reading 7 (fdset ffbef9a8 set 0)
trace:  snmpUnixDomain.c, 145:
netsnmp_unix: recv fd 6 got 68 bytes
dumpx_recv:30 00 00 00 
dumpv_recv:  Integer:	48 (0x30)
trace:  snmp_api.c, 5398:
sess_read:   loop packet_len 68, PDU length 68
trace:  snmp_api.c, 4898:
sess_process_packet: session 2b5a0 fd 6 pkt 99ff8 length 68
trace:  agentx/protocol.c, 1481:
dumph_recv: AgentX Header
trace:  agentx/protocol.c, 1482:
dumph_recv:   Version
dumpx_recv:    01 
dumpv_recv:      Version:	1
trace:  agentx/protocol.c, 1489:
dumph_recv:   Command
dumpx_recv:    06 
dumpv_recv:      Command:	6 (Get Next)
trace:  agentx/protocol.c, 1497:
dumph_recv:   Flags
dumpx_recv:    00 
dumpv_recv:      Flags:	0x0
trace:  agentx/protocol.c, 1504:
dumph_recv:   Reserved Byte
dumpx_recv:    00 
dumpv_recv:      Reserved:	0x0
trace:  agentx/protocol.c, 1510:
dumph_recv:   Session ID
dumpx_recv:    09 00 00 00 
dumpv_recv:      Integer:	9 (0x09)
trace:  agentx/protocol.c, 1518:
dumph_recv:   Transaction ID
dumpx_recv:    10 00 00 00 
dumpv_recv:      Integer:	16 (0x10)
trace:  agentx/protocol.c, 1526:
dumph_recv:   Packet ID
dumpx_recv:    11 00 00 00 
dumpv_recv:      Integer:	17 (0x11)
trace:  agentx/protocol.c, 1533:
dumph_recv:   Payload Length
dumpx_recv:    30 00 00 00 
dumpv_recv:      Integer:	48 (0x30)
trace:  agentx/protocol.c, 1625:
dumph_recv:   PDU
trace:  agentx/protocol.c, 1754:
dumph_recv:       Search Range
trace:  agentx/protocol.c, 1116:
dumph_recv:         OID Header
dumpx_recv:          05 02 01 00 
dumpv_recv:            # subids:	5 (0x05)
trace:  agentx/protocol.c, 1120:
dumpv_recv:             prefix: 	2 (0x02)
trace:  agentx/protocol.c, 1123:
dumpv_recv:             inclusive:	1 (0x01)
trace:  agentx/protocol.c, 1128:
dumph_recv:         OID Segments
  parse_oid
  sizeof(oid) = 4
dumpx_recv:          01 00 00 00 
dumpv_recv:            Integer:	1 (0x01)
dumpx_recv:          5C 00 00 00 
dumpv_recv:            Integer:	92 (0x5C)
dumpx_recv:          01 00 00 00 
dumpv_recv:            Integer:	1 (0x01)
dumpx_recv:          03 00 00 00 
dumpv_recv:            Integer:	3 (0x03)
dumpx_recv:          01 00 00 00 
dumpv_recv:            Integer:	1 (0x01)
trace:  agentx/protocol.c, 1203:
dumpv_recv:         OID: NOTIFICATION-LOG-MIB::nlmLogTable
trace:  agentx/protocol.c, 1116:
dumph_recv:         OID Header
dumpx_recv:          05 02 00 00 
dumpv_recv:            # subids:	5 (0x05)
trace:  agentx/protocol.c, 1120:
dumpv_recv:             prefix: 	2 (0x02)
trace:  agentx/protocol.c, 1123:
dumpv_recv:             inclusive:	0 (0x00)
trace:  agentx/protocol.c, 1128:
dumph_recv:         OID Segments
  parse_oid
  sizeof(oid) = 4
dumpx_recv:          01 00 00 00 
dumpv_recv:            Integer:	1 (0x01)
dumpx_recv:          5C 00 00 00 
dumpv_recv:            Integer:	92 (0x5C)
dumpx_recv:          01 00 00 00 
dumpv_recv:            Integer:	1 (0x01)
dumpx_recv:          03 00 00 00 
dumpv_recv:            Integer:	3 (0x03)
dumpx_recv:          02 00 00 00 
dumpv_recv:            Integer:	2 (0x02)
trace:  agentx/protocol.c, 1203:
dumpv_recv:         OID: NOTIFICATION-LOG-MIB::nlmLogVariableTable
trace:  agentx/subagent.c, 266:
agentx/subagent: handling agentx request (req=0x11,trans=0x10,sess=0x9)
trace:  agentx/subagent.c, 293:
agentx/subagent:   -> getnext
trace:  agentx/subagent.c, 303:
agentx/subagent: saved variables
trace:  snmpCallbackDomain.c, 443:
transport_callback: hook_build enter
trace:  snmpCallbackDomain.c, 455:
transport_callback: hook_build exit
trace:  snmpCallbackDomain.c, 237:
transport_callback: hook_send enter
trace:  snmpCallbackDomain.c, 91:
dump_send_callback_transport: PDU: command = 161, errstat = 0, errindex = 0
trace:  snmpCallbackDomain.c, 93:
dump_send_callback_transport:   var 2:trace:  mib.c, 1978:
output: sprint_by_type, type 194
trace:  mib.c, 2038:
sprint_by_type: bad type: 194
NOTIFICATION-LOG-MIB::nlmLogTable = Variable has bad type
trace:  snmpCallbackDomain.c, 318:
transport_callback: hook_send exit
trace:  snmp_api.c, 5216:
sess_read: not reading 4 (fdset ffbef9a8 set 0)
trace:  snmp_api.c, 5630:
sess_select: for all sessions: 9 7 6 4 
trace:  snmp_api.c, 5216:
sess_read: not reading 9 (fdset ffbef9a8 set 0)
trace:  snmp_api.c, 5216:
sess_read: not reading 7 (fdset ffbef9a8 set 0)
trace:  snmp_api.c, 5216:
sess_read: not reading 6 (fdset ffbef9a8 set 0)
trace:  snmpCallbackDomain.c, 188:
transport_callback: hook_recv enter
trace:  snmpCallbackDomain.c, 214:
transport_callback: hook_recv exit
trace:  snmp_api.c, 4898:
sess_process_packet: session 25f88 fd 4 pkt 99ff8 length 1
trace:  snmpCallbackDomain.c, 91:
dump_recv_callback_transport: PDU: command = 161, errstat = 0, errindex = 0
trace:  snmpCallbackDomain.c, 93:
dump_recv_callback_transport:   var 2:trace:  mib.c, 1978:
output: sprint_by_type, type 194
trace:  mib.c, 2038:
sprint_by_type: bad type: 194
NOTIFICATION-LOG-MIB::nlmLogTable = Variable has bad type
trace:  snmp_agent.c, 1233:
snmp_agent: agent_session 00080af8 created
trace:  agent_registry.c, 156:
subtree: looking for subtree for context: ""
trace:  agent_registry.c, 160:
subtree: found one for: ""
trace:  snmp_agent.c, 1806:
snmp_agent: add_vb_to_cache(   80af8, 1, NOTIFICATION-LOG-MIB::nlmLogTable,    2e550)
trace:  snmp_agent.c, 1871:
snmp_agent: tp->start NOTIFICATION-LOG-MIB::nlmLogTable, tp->end NOTIFICATION-LOG-MIB::nlmLogVariableTable, 
trace:  snmp_agent.c, 1897:
snmp_agent: varbind 1 is inclusive
trace:  snmp_agent.c, 3142:
snmp_agent: inclusive range(s) in getNext
trace:  agent_handler.c, 443:
handler:calling: main handler bulk_to_next
trace:  agent_handler.c, 381:
handler:calling: calling handler bulk_to_next for mode GET
trace:  agent_handler.c, 381:
handler:calling: calling handler table for mode GET
trace:  table.c, 177:
helper:table: Got request for handler table: base oid:NOTIFICATION-LOG-MIB::nlmLogTable
NOTIFICATION-LOG-MIB::nlmLogTable
trace:  agent_handler.c, 389:
handler:returned: handler table returned 0
trace:  agent_handler.c, 389:
handler:returned: handler bulk_to_next returned 0
trace:  snmp_agent.c, 2651:
snmp_agent: asp->mode == SNMP_MSG_GET in ch_getnext
trace:  snmp_agent.c, 2784:
results: getnext results, before next pass:
trace:  snmp_agent.c, 2787:
results: 	trace:  mib.c, 1978:
output: sprint_by_type, type 199
trace:  mib.c, 2038:
sprint_by_type: bad type: 199
NOTIFICATION-LOG-MIB::nlmLogTable = Variable has bad type
trace:  snmp_agent.c, 1806:
snmp_agent: add_vb_to_cache(   80af8, 1, NOTIFICATION-LOG-MIB::nlmLogTable,    2e550)
trace:  snmp_agent.c, 1871:
snmp_agent: tp->start NOTIFICATION-LOG-MIB::nlmLogTable, tp->end NOTIFICATION-LOG-MIB::nlmLogVariableTable, 
trace:  agent_handler.c, 443:
handler:calling: main handler bulk_to_next
trace:  agent_handler.c, 381:
handler:calling: calling handler bulk_to_next for mode GETNEXT
trace:  agent_handler.c, 381:
handler:calling: calling handler table for mode GETNEXT
trace:  table.c, 177:
helper:table: Got request for handler table: base oid:NOTIFICATION-LOG-MIB::nlmLogTable
NOTIFICATION-LOG-MIB::nlmLogTable
trace:  table.c, 464:
helper:table:   oid indexes not complete: NOTIFICATION-LOG-MIB::nlmLogTable
trace:  table.c, 512:
helper:table:   column: 2, indexes: 0trace:  mib.c, 1978:
output: sprint_by_type, type 4
   index: type=4(04), value=""trace:  mib.c, 1978:
output: sprint_by_type, type 66
trap received.txt (text/plain, 7.9 KB)
dumpv_recv:      Command:	18 (Response)
trace:  agentx/protocol.c, 1497:
dumph_recv:   Flags
dumpx_recv:    00 
dumpv_recv:      Flags:	0x0
trace:  agentx/protocol.c, 1504:
dumph_recv:   Reserved Byte
dumpx_recv:    00 
dumpv_recv:      Reserved:	0x0
trace:  agentx/protocol.c, 1510:
dumph_recv:   Session ID
dumpx_recv:    09 00 00 00 
dumpv_recv:      Integer:	9 (0x09)
trace:  agentx/protocol.c, 1518:
dumph_recv:   Transaction ID
dumpx_recv:    00 00 00 00 
dumpv_recv:      Integer:	0 (0x00)
trace:  agentx/protocol.c, 1526:
dumph_recv:   Packet ID
dumpx_recv:    18 16 D2 18 
dumpv_recv:      Integer:	416421400 (0x18D21618)
trace:  agentx/protocol.c, 1533:
dumph_recv:   Payload Length
dumpx_recv:    08 00 00 00 
dumpv_recv:      Integer:	8 (0x08)
trace:  agentx/protocol.c, 1625:
dumph_recv:   PDU
dumpx_recv:      D3 90 03 00 
dumpv_recv:        Integer:	233683 (0x390D3)
dumpx_recv:      00 00 
dumpv_recv:        Short:	0 (0x00)
dumpx_recv:      00 00 
dumpv_recv:        Short:	0 (0x00)
trace:  agentx/protocol.c, 1838:
dumph_recv:       VarBindList
trace:  agentx/client.c, 76:
agentx/subagent: synching input, op 0x01
trace:  snmp_api.c, 5216:
sess_read: not reading 4 (fdset ffbef630 set 0)
trace:  agentx/subagent.c, 948:
agentx/subagent: session 2a9a0 responded to ping
trace:  snmp_alarm.c, 249:
snmp_alarm: alarm 3 completed
trace:  snmp_api.c, 5630:
sess_select: for all sessions: 9 7 6 4 
trace:  snmp_api.c, 5630:
sess_select: for all sessions: 9 7 6 4 
trace:  snmpUDPDomain.c, 133:
netsnmp_udp: recvfrom fd 9 got 45 bytes (from 127.0.0.1)
trace:  snmp_api.c, 4898:
sess_process_packet: session 97c10 fd 9 pkt 99ff8 length 45
dumpx_recv:02 01 00 
dumpv_recv:  Integer:	0 (0x00)
trace:  snmp_api.c, 3925:
snmp_api: Parsing SNMPv1 message...
trace:  snmp_api.c, 3931:
dumph_recv: SNMPv1 message

trace:  snmp_auth.c, 131:
dumph_recv:   SNMP version
dumpx_recv:    02 01 00 
dumpv_recv:      Integer:	0 (0x00)
trace:  snmp_auth.c, 143:
dumph_recv:   community string
dumpx_recv:    04 06 70 75 62 6C 69 63 
dumpv_recv:      String:	public
trace:  snmp_api.c, 3974:
dumph_recv:   PDU
dumpx_recv:    06 08 2B 06 01 04 01 03 01 01 
dumpv_recv:      ObjID: SNMPv2-SMI::enterprises.3.1.1
dumpx_recv:    40 04 0A 1E 05 0F 
dumpv_recv:      String:	
...
dumpx_recv:    02 01 00 
dumpv_recv:      Integer:	0 (0x00)
dumpx_recv:    02 01 00 
dumpv_recv:      Integer:	0 (0x00)
dumpx_recv:    43 04 04 8A 51 21 
dumpv_recv:      UInteger:	76173601 (0x48A5121)
trace:  snmp_api.c, 4225:
dumph_recv:     VarBindList
trace:  snmptrapd_handlers.c, 954:
snmptrapd: input: a4
trace:  snmptrapd_handlers.c, 1012:
snmptrapd: Trap OID: SNMPv2-MIB::coldStart
trace:  snmptrapd_handlers.c, 591:
snmptrapd: print_handler
trace:  snmptrapd_handlers.c, 634:
snmptrapd: v1 format
2005-09-14 11:59:58 svrtelco02 [10.30.5.15] (via 127.0.0.1) TRAP, SNMP v1, community public
	SNMPv2-SMI::enterprises.3.1.1 Cold Start Trap (0) Uptime: 8 days, 19:35:36.01

trace:  snmptrapd_handlers.c, 482:
snmptrapd: get_traphandler default (82310)
trace:  snmptrapd_handlers.c, 818:
snmptrapd: command_handler
trace:  snmptrapd_handlers.c, 819:
snmptrapd: token = '/data4/ivan/perl/installed/bin/perl /usr/local/bin/traptoemail -s 10.30.1.9 -f [email protected] [email protected]'
trace:  default_store.c, 191:
netsnmp_ds_set_boolean: Setting LIB:13 = 1/True
trace:  snmptrapd_handlers.c, 847:
snmptrapd: execute format
trace:  mib.c, 1978:
output: sprint_by_type, type 67
trace:  utilities/execute.c, 209:
run:exec: running '/data4/ivan/perl/installed/bin/perl /usr/local/bin/traptoemail -s 10.30.1.9 -f [email protected] [email protected]'
trace:  utilities/execute.c, 291:
verbose:run:exec:   waiting for child 4193...
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 344:
verbose:run:exec:       child not done!?!
trace:  utilities/execute.c, 303:
verbose:run:exec:     calling select
trace:  utilities/execute.c, 329:
verbose:run:exec:     read 0 bytes
trace:  utilities/execute.c, 337:
verbose:run:exec:     no data!
trace:  utilities/execute.c, 346:
verbose:run:exec:       child done
trace:  utilities/execute.c, 377:
verbose:run:exec:   done reading
trace:  utilities/execute.c, 405:
run:exec:   child 4193 finished. result=0
trace:  default_store.c, 191:
netsnmp_ds_set_boolean: Setting LIB:13 = 0/False
trace:  notification_log.c, 677:
snmptrapd: notification_handler
trace:  notification_log.c, 484:
log_notification: logging something
trace:  mib.c, 3549:
build_oid_noalloc: generated: .7.100.101.102.97.117.108.116.1
trace:  table_data.c, 143:
table_data_add_data: added something...
trace:  notification_log.c, 630:
log_notification: done logging something
trace:  snmp_api.c, 5216:
sess_read: not reading 7 (fdset ffbef9a8 set 0)
trace:  snmp_api.c, 5216:
sess_read: not reading 6 (fdset ffbef9a8 set 0)
trace:  snmp_api.c, 5216:
sess_read: not reading 4 (fdset ffbef9a8 set 0)
trace:  snmp_api.c, 5630:
sess_select: for all sessions: 9 7 6 4 
trace:  snmp_api.c, 5630:
sess_select: for all sessions: 9 7 6 4 
trace:  snmp_alarm.c, 247:
snmp_alarm: run alarm 3
trace:  agentx/subagent.c, 928:
agentx/subagent: checking status of session 2a9a0
trace:  agentx/protocol.c, 611:
dumph_send: AgentX Header
dumpx_send:  01 0D 00 00 
dumpv_send:    Version:	1
trace:  agentx/protocol.c, 614:
dumpv_send:     Command:	13 (Ping)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.