Receiving SNMP Traps from Network Devices or Systems
You can set up HQ to receive and log SNMP messages from a remote network management system or other SNMP-capable system or device. You can set alerts based on the received SNMP data to trigger notifications or other responses.
The process involves configuring the agent and the network system or device to communicate with each other, and creating a platform of type "Network Device" to represent the remote system or device.
Step 1: Select and Enable an Agent to Receive Traps
When you configure an platform of type "Network Device" you provide specify connection information for an HQ Agent running on an operating system in your environment - that agent will receive the SNMP data. The agent you designate must be able to receive traps.
Note that the HQ Agent's default UDP port for receiving traps is 162, in the privileged range, which the agent cannot access unless it runs as as root (or as an Administrative user on Windows).
If you run the agent under the context of an non-administrative user, configure a non-privileged port to receive SNMP traps, by adding this property to its agent.properties file.
snmpTrapReceiver.listenAddress=udp:0.0.0.0/1620
This setting enables the agent to receive traps through any interface on the platform at UDP port 1620. If desired, you can specify an specific interface's IP address, or different port in the unprivileged range (1024 or above). Restart the HQ Agent after defining the listen address.
| Why Don't I See the Open Port With `netstat`? If you try to check that the SNMP port is open at this point, netstat will not show it open. Once you complete all steps in this procedure netstat output will produce expected results. |
Step 2: Configure Trap Generator
Set up the HQ Agent as a trap destination on the SNMP-enabled system or application, supplying the HQ Agent's SNMP listen address and port - either the default connection settings, or if applicable, those configured in the previous step.
Step 3: Create a Proxy Platform for Trap Data
In HQ, remotely monitored resources are represented as a platform. To create a platform for the remote device or host:
- Select New Platform from the Tools menu.
- Enter a name for your platform.
- Select "Network Device" from the Platform Type pulldown.
- Enter the FQDN of the network device or host.
- Select the agent connection from the pulldown list - it must have connectivity to the SNMP port on the device or host.
- Enter the IP address of the network device or host. Do not use 127.0.0.1, even if the application is local to the agent being used for the SNMP connection.
- The netmask or MAC address of the device or server may be required depending on the configuration of the device.
- Click OK.
- The Inventory tab for the new platform is displayed.
- Click Edit button in the Configuration Properties section.
- Select the interface.index the device uses to uniquely identify interface services. Most devices work with the default ("ifDescr").
- Supply or validate the snmpIp, snmpPort and SNMP community string.
- Select the value for snmpVersion that corresponds to the device.
- If you use SNMP v3, it is likely that authentication is configured, in which case enter username, password and auth type.
- Check the box next to Enable Log Tracking, then click OK.
Monitoring will start in a few minutes.
Solving Problems
If the configuration is not accepted:
- Verify the IP address, SNMP port, SNMP version, and authentication settings, as applicable.
- Verify that the agent you selected for the proxy platform has network connectivity and can reach the SNMP port of the network device (check firewalls).
- Make sure that the community string configured for the proxy platform is the same as the community string the trap generator uses to send traps. If the strings do not match, traps cannot be sent to the proxy platform - instead, traps will be routed to the default platform, if that platform has log tracking enabled.
- Check the HQ Agent log file to make sure that the agent has opened the proper UDP port. If properly configured, you should see messages similar to:
2008-06-05 16:45:05,447 DEBUG [SNMPTrapReceiver] snmpTrapReceiver.listenAddress=udp:0.0.0.0/1620 2008-06-05 16:45:05,572 DEBUG [SNMPTrapReceiver] Add 1:10003 for 10.2.0.2-switch