Network Management
Configure Net-SNMP for Linux devices to improve display of MIB and OID data in the SolarWinds Platform
The article details the steps you may be required to carry out while configuring your nodes for SNMP polling
First published date
Last published date
Overview
This article provides steps on how to fix issues with the presentation of the SNMP MIB and OID data that make information difficult to display in the SolarWinds Platform.
Sometimes the information presented to SolarWinds within a particular OID may appear to be changing such that the static objects meant to be monitored via Universal Device Poller or Custom Poller are not consistently located at the same OID.
This means that it is nearly impossible to use either an SNMP GET or GET TABLE request to consistently show something like a module or interface status if the OID does not consistently correspond to a status indicator, or does not consistently correspond to a particular module or interface with status, temperature, and so on, as a child OID.
For more information, click here.
The data needs to be presented from Net-SNMP in a way that conforms with the way SolarWinds polls for SNMP data via Universal Device Pollers. This can be found in Monitor custom statistics based on MIBs and OIDs with Universal Device Pollers .
Product section
Cause
Resolution
Note: This is meant as a guide. Commands may be different as they are dependent on device versions and configurations.
- Install and set up Net-SNMP for basic SNMP monitoring on Linux Unix and Raspberry Pi systems. The purpose of this is to set up Net-SNMP to monitor status, CPU, memory, and volumes such as /, /etc/ and other directories. This configuration also enables monitoring processes running on the systems. Additional security such as locking to specific IPs and SNMPv3 is recommended.
- Update the system, and then install snmpd:
sudo apt-get update
sudo apt-get install snmpd -- Scripts are not supported under any SolarWinds support program or service. -- Scripts are provided AS IS without warranty of any kind. SolarWinds further -- disclaims all warranties including, without limitation, any implied warranties -- of merchantability or of fitness for a particular purpose. The risk arising -- out of the use or performance of the scripts and documentation stays with you. -- In no event shall SolarWinds or anyone else involved in the creation, -- production, or delivery of the scripts be liable for any damages whatsoever -- (including, without limitation, damages for loss of business profits, business -- interruption, loss of business information, or other pecuniary loss) arising -- out of the use of or inability to use the scripts or documentation. - Modify the file
snmpd.confto set up the configuration to monitor your system from across the network. The following configuration lets anyone read the SNMP data. These are the basics needed to start monitoring right away via SNMPv2:- Open the
snmpd.conffile in a text editor.sudo nano /etc/snmp/snmpd.conf
- Change the IP binding by changing the agent address:
agentAddress udp:127.0.0.1:161
Bind to all IP addresses:agentAddress 161
Or to a specific IP:agentAddress udp:127.0.0.1:161,udp:192.168.1.2:161
Modify and set a Community String line:rocommunity public
(without the initial #)
- Open the
- For Linux 9.5, run the following scripts to validate SNMP configuration.
a. Check the status of service by running the command
sudo systemctl status snmpd
b. Check on firewall to see if port 161/udp is added, sample screenshot should show the port.
firewall-cmd --list-all
c. If port does not show, run the following commands.
sudo firewall-cmd --permanent --add-port=161/udp
sudo firewall-cmd --reload
d. Check the snmpd.conf
cd /etc/snmp
cat snmpd.conf
e. If all steps are done and the issue still persists, run the next commands to make sure changes are applied.
firewall-cmd --add-service=snmp --permanent
firewall-cmd --reload
f. Reboot the target node is needed.
- Restart the SNMP daemon:
sudo /etc/init.d/snmpd restart