snmp traps

Serge Aleynikov serge@REDACTED
Fri Jun 10 05:07:32 CEST 2005


erlang-questions@REDACTED wrote:
> I am somewhat struggling with the documentation of SNMP traps.  Can someone explain to me the meaning of some parameters in the SNMP's config files?
> 
> notify.conf
> {NotifyName, Tag, Type}.
> 
> - What is the Tag used for?

Tag is described in the mibs:

SNMP-TARGET-MIB::SnmpTagValue
SNMP-NOTIFICATION-MIB::snmpNotifyTag

> target_addr.conf
> {TargetName,Ip,Udp,Timeout,RetryCount,TagList,ParamsName,EngineId,
>   TMask, MaxMessageSize}.
> 
> - What are TagList and TMask?

TagList is described in the mib:

SNMP-TARGET-MIB::SnmpTagList
SNMP-TARGET-MIB::snmpTargetAddrTagList

I am still not sure what TMask stands for...

> Also, the os_mon application supports OTP-OS-MON-MIB mib.  Can it automatically send traps described in the mib when corresponding alarms are set, or is it a responsibility of a programmer to write and install an alarm handler and convert alarm events into appropriate traps?

???

> In order to test an ability to send traps, I verified that I could do so by running:
> 
> ~>snmptrap -c public -v2c 169.132.9.113 uptime loadSystemMemoryHighAlarm
> 
> However after configuring and starting the SNMP agent, the commands below don't seem to deliver traps to the manager at 169.132.9.113:
> 
> 10> snmp_notification_mib:add_notify("test", "sample test", trap).
> {ok,"test"}
> 11> snmp_target_mib:add_addr("test", [169,132,9,113], 162, 5000, 3, "sample test", "", "", "", 2048).
> {ok,"test"}
> 12> snmp:send_notification(snmp_master_agent, loadSystemMemoryHighAlarm, no_receiver, "test", []).
> {send_trap,loadSystemMemoryHighAlarm,"test",[],no_receiver,[]}

One more point to remember - Tags shouldn't have spaces, tags, LR and CR 
in them, so this is more appropriate:

snmp_notification_mib:add_notify("test", "sample_test", trap).

However, even with this syntax traps still don't get sent.

Continuing to explore...

Serge




More information about the erlang-questions mailing list