jeffry copps
jeffry copps

Reputation: 305

A nested net-snmp snmptrap message sending example

Most of the examples provided for sending SNMP traps are simple ones like the one below.

snmptrap -v 1 -c public host TRAP-TEST-MIB::demotraps localhost 6 17 '' \
    SNMPv2-MIB::sysLocation.0 s "Just here"

Take any MIB file, they contain many complex object groups, for example, systemGroup contains sysLocation, sysName, etc.

Could someone help in bringing out examples to show the way how to send snmp traps which includes such OBJECT-GROUPS. Adding one more question here, Does SNMPTRAPD support internationalization?

Upvotes: 1

Views: 1890

Answers (1)

Andrew Komiagin
Andrew Komiagin

Reputation: 6566

It is really bad practice to define the SNMP notification (trap or inform) the way that it contains the entire OBJECT GROUP or even worse the entire SNMP table. The reason is that you don't really need all these variables anyway. The other reason is that the packet/PDU is limited by MTU size. So it is possible that you'll not be able to send the data within single UDP packet due to its size.

The proper scenario would be to have few varbinds and you could also initiate some polling cycle to find out what happens if you need more details when you receive such trap.

SNMPTRAPD and NET-SNMP library in general do not support internationalization (UNICODE). The library is limited to ASCII charset only.

There are commercial products on the market including NetDecision TrapVision and some other that fully support UTF-8 internationalization.

Upvotes: 3

Related Questions