Skip to content

A system that listens SNMP traps, sends alerts regarding the same from the manager device to other devices and shows alerts on a web interface.

Notifications You must be signed in to change notification settings

vsbrt/SNMP-Traps-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNMP-Traps-Tool

A system that listens SNMP traps, sends alerts regarding the same from the manager device to other devices and shows alerts on a web interface.

Prerequisties:

Some of the dependencies required for executing assignment3 are

  • Perl Module Net::SNMP

  • Perl Module Config::IniFiles

  • Linux Lamp Stack which includes PHP, MySQL, Apache in one package.

  • For installing the Lampstack, Enter the following command in the terminal:

    • sudo apt-get install lamp-server^
  • perl (On the listner as well as agent machine)

  • snmp (On the listner as well as agent machine)

  • snmpd (On the listner as well as agent machine)

EXECUTION OF THE SCRIPT:

  1. Change the database the creditials in db.conf in et2536-save15/ Folder.
  2. Change the permissions of apache directory /var/www by the entering the following command: "sudo chmod -R 777 /var/www to avoid problems"
  3. Add the following lines to the snmpdtrapd.conf file in the /etc/snmp/snmptrapd.conf:

authCommunity log,execute,net public disableAuthorization yes #doNotLogTraps yes snmpTrapdAddr udp:50162 traphandle 1.3.6.1.4.1.41717.10.* /usr/bin/perl path/to/et2536-save15/assignment3/trapDaemon.pl 4. In the configuration of the snmptrapd.conf near traphandle add the path of the script, such that the scripts gets executed. 5. Change TRAPDRUN=yes in /etc/default/snmpd. 6. sudo service snmpd restart. 7. Then Open the Terminal and give the command as:

sudo snmptrap -v 1 -c public 192.168.32.141:50162 .1.3.6.1.4.1.41717.10 10.2.3.4 6 247 '' .1.3.6.1.4.1.41717.10.1 s "" .1.3.6.1.4.1.41717.10.2 i 1


  1. Open localhost/et2536-save15/assignment3/index.php, where you can see the status of the device.
  2. If there is a Fail trap recieved, then the on the webpage, there is a link as "SNMP TRAP SENDER".
  3. Click on the specified link on the webpage to send the Traps to the manager specified to the user.
  4. After the link is clicked, specify the IP, COMMUNITY and PORT for which the trap should be sent.
  5. Click submit.

NOTE: IF THERE is NO PREVIOUS STATUS AND TIME then those corresponding OID's are not present in the TRAP when the trap is being sent to the trap listener.

About

A system that listens SNMP traps, sends alerts regarding the same from the manager device to other devices and shows alerts on a web interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published