[erlang-questions] SNMP Notify Target

Dick Oyen <>
Thu Jul 12 17:09:16 CEST 2012


I am trying to get an SNMP example to send an SNPM trap, but am not succeeding. Any example would do. I am using the tutorial in http://www.trapexit.org/SNMP_Quick_Start because it is easiest for me to understand. The tutorial says to enter:
snmpa:send_notification(snmp_master_agent, testMIBMyFirstCoolTrap, no_receiver, "DrpManager", "", []).
It returns 'ok', but there is no evidence in Wireshark, the agent's Erlang SNMP log, or the SNMP manager that the trap was actually sent.
Using the Erlang debugger, I step through 'snmpa' code and find that the list of notify targets is empty.
Please tell me how snmpa should know the notify targets.
Here is what I have tried:
I tried changing the NotifyName argument from "DrpManager" to "", because "DrpManager" does not appear in anywhere in the conf or mib files and the doc says that empty string should cause it to send to all targets, but my debugger stepping shows that the list is still empty.
I tried changing NotifyName to "MyFirstCoolTrap" because notify.conf contains {"MyFirstCoolTrap", "tag1", trap}, but the list is still empty.
I wonder if the agent is supposed to know about the manager (before the send_notification/6) because of the manager's call to
snmpm:sync_get("simple_user", "otp agent", [[erlNodeName,1]]), which does appear in the agent's SNMP log.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120712/e55a056c/attachment.html>


More information about the erlang-questions mailing list