Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
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.
Rob Leadbeater
Honored Contributor

Re: SNMP Traps from Linux Server

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:

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.

David Claypool
Honored Contributor

Re: SNMP Traps from Linux Server

If it's a ProLiant server, see