How to configure an SNMP Trap Service

To successfully receive SNMP messages, the SNMP trap service needs to be configured. Configuration steps according to operating system:

WINDOWS

Prerequisites

The Simple Network Management Protocol service must be installed on the machine where ERA Server is installed, as well as the machine where the SNMP trap software will be installed.

Both computers (above) should be in the same subnet.

The SNMP Service must be configured on the ERA Server computer.

SNMP Service configuration (ERA Server)

Press the Windows key + R to open a run dialog box, type Services.msc into the Open field and press Enter. Search for the SNMP Service.

Open the Traps tab, type public into the Community name field and click Add to list.

Click Add, type the Host name, IP or IPX address of the computer where the SNMP trapping software is installed into the appropriate field and click Add.

Proceed to the Security tab. Click Add to display the SNMP Service Configuration window. Type public into the Community name field and click Add. Rights will be set to READ ONLY, this is ok.

Make sure that Accept SNMP packets from any hosts is selected and click OK to confirm. The SNMP service is not configured.

SNMP Trap Software configuration (Client)

The SNMP Service is installed and doesn`t need to be configured.

Install AdRem SNMP Manager or AdRem NetCrunch.

AdRem SNMP Manager: Start the application and select Create New SNMP Node List. Click Yes to confirm.

Check the network address of your subnet (displayed in this window). Click OK to search your network.

Wait for the search to finish, the search results will be displayed in the Discovery results window. The IP address of the ERA Server should be displayed in this list.

Select the IP address of the server and click OK. Your server address is displayed in the Nodes section.

Click Trap Receiver Stopped and select Start. Trap Receiver Started will be displayed. Now you can receive SNMP messages from your ERA Server.

LINUX

1.Install the snmpd package by running one of the following command:
apt-get install snmpd snmp (Debian, Ubuntu distributions)
yum install net-snmp (Red-Hat, Fedora distributions)

2.Open the /etc/default/snmpd file and make the following attribute edits:

#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'
Adding will disable this line completely.

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
Add this line to the file.

TRAPDRUN=yes
Change the trapdrun attribute to yes.

3.Create a backup of the original snmpd.conf file. The file will be edited later.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.original

4.Create a new snmpd.conf file and add these lines:

rocommunity public
syslocation "Testing ERA6"
syscontact admin@ERA6.com

5.Open the /etc/snmp/snmptrapd.conf file and add the following line at the end of the file:

authCommunity log,execute,net public

6.Type the following command to start the SNMP manager services and logging of incoming traps:

/etc/init.d/snmpd restart
or
service snmpd restart

7.To check if the trap is working and catching the messages, run the following command:

tail -f /var/log/syslog | grep -i TRAP