• Around The HomeToggle Menu

    • Entertainment
    • Productivity
    • Smart Home
  • FamilyToggle Menu

    • Parenting
    • Toys
    • Pets
    • Travel
  • Product ReviewsToggle Menu

    • Phones
    • Tablets
    • Laptops
    • Desktops
    • Wearables
    • Audio
    • Cameras
    • Headphones
    • Printers
    • Smart Home
    • TVs
    • Gaming and Video
  • One Cool ThingToggle Menu

    • Frugal Tech
    • Kickstarters
    • Videos
Techwalla
  1. Home
  2. Around The Home
  3. Productivity
  4. How to Setup SNMP TRAP on Ubuntu

How to Setup SNMP TRAP on Ubuntu

March 31, 2015
By: Jonah Quant
  • Share
  • Share on Facebook

The Simple Network Management Protocol is a standard way of managing devices connected to networks based on the Internet Protocol. Each SNMP "manager" can monitor in detail the operation of remote devices -- "clients" -- such as switches and routers and, in some cases, reconfigure them as well. In particular, the SNMP standard includes a mechanism for having clients send asynchronous notifications -- "traps" -- to managers at the time events deemed significant happen. You can configure your Ubuntu computer to receive and process SNMP traps from clients.

...
You can receive notifications of remote SNMP events in the form of traps.

Step

Press the "Ctrl", "Alt" and "F1" keys at the Ubuntu login prompt to bring up a text-mode login prompt. Log in as your regular user. Ubuntu will present you with a command-line prompt, a "shell".

Step

Elevate the shell's privileges to superuser by typing the following command:

sudo -l

Press "Enter." Type your password, and press "Enter" again.

Step

Download and install the SNMP manager utilities by typing the following command:

apt-get install snmpd

Press "Enter."

Step

Open file "/etc/snmp/snmpd.conf" with a text editor, search for the line containing the words "master agentx" and remove the initial "#" character from that line. Save the file and exit the editor.

Step

Open file "/etc/snmp/snmptrapd.conf" with a text editor and add the following line at the end of the file:

TRAPDRUN=yes

Save the file and exit the editor.

Step

Type the following commands to start the SNMP manager services and the logging of incoming traps:

/etc/init.d/snmpd restart snmptrapd -P -F "%02.2h:%02.2j TRAP%w.%q from %A\n"

Press "Enter" after each line. At that point, snmptrapd will be listening for incoming SNMP traps. When snmptrapd receives a trap, it will log it to standard output, indicating the time of the day, the trap code and the host name of the device that originated the trap.

Show Comments

Related Articles

How to Reinstall USB Mouse Drivers in Ubuntu Using the Command Line

How to Reinstall USB Mouse Drivers in Ubuntu Using the Command Line

Around The Home
Productivity
By: W. P. Wentzell
How to Sync Mail Accounts

How to Sync Mail Accounts

Around The Home
Productivity
By: Steve Gregory
How to Convert SWF to AVI in Ubuntu

How to Convert SWF to AVI in Ubuntu

Around The Home
Productivity
By: Kristen Waters
How to Use VNC Viewer in Ubuntu

How to Use VNC Viewer in Ubuntu

Around The Home
Productivity
By: Kristen Waters
How to Connect Ubuntu to Windows With a Crossover Cable

How to Connect Ubuntu to Windows With a Crossover Cable

Around The Home
Productivity
By: Andrea Helaine
How to Get Roblox Running on Ubuntu

How to Get Roblox Running on Ubuntu

Around The Home
Productivity
By: DaveW
  • HOW WE SCORE
  • ABOUT US
  • CONTACT US
  • TERMS
  • PRIVACY POLICY
  • COPYRIGHT POLICY
  • Advertise

An error occurred. Try again later.

Thanks for signing up!
© 2018 Leaf Group Ltd. / Leaf Group Lifestyle

Get great tech advice delivered to your inbox.

Keep your family productive, connected, entertained, and safe.

Please enter a valid email.