General
cancel
Showing results for 
Search instead for 
Did you mean: 

SNMP Traps from Linux Server

Ajay Bhatnagar
Occasional Contributor

SNMP Traps from Linux Server

How to send SNMP Traps from Linux Server.
3 REPLIES
Rob Leadbeater
Honored Contributor

Re: SNMP Traps from Linux Server

Matti_Kurkela
Honored Contributor

Re: SNMP Traps from Linux Server

Install the Net-SNMP tools (normally available in your Linux distribution's standard package collection) using your favourite package manager.

Read "man snmptrap".

Decide the SNMP version you want to use (version 1, 2c or 3).

Pick the correct OID (either use a standard OID that means what you're trying to "say" or get your own OID and write a MIB file to describe the structure and meaning of your trap messages). Information about OIDs and MIBs is available at:

http://www.mibdepot.com/

The standard MIBS can be found under vendor "IETF".
See also the FAQ section on that site.

If you want to send SNMP Traps manually or from a script, the above-mentioned "snmptrap" command is what you need.

If you want to send trap messages programmatically, be aware that there are SNMP function libraries available for many programming languages. If you're programming in C, get the Net-SNMP source package. Read the programming documentation in it, or just examine the source code of the snmptrap tool.

If you're programming in Java e.g. for BEA Weblogic server, it already contains SNMP functionality: just read the BEA documentation to find out how to use it.

MK
MK
David Claypool
Honored Contributor

Re: SNMP Traps from Linux Server

If it's a ProLiant server, see http://www.hp.com/go/proliantlinux