Comprehensive Guide to Monitoring RHEL 7 with SNMP in Nagios XI
Maintaining the health and performance of your RHEL 7 servers is essential for a stable IT environment. SNMP (Simple Network Management Protocol) offers a streamlined, agentless approach to monitoring, making it an efficient choice for integrating with Nagios XI.
In this guide, you’ll learn how to set up and configure SNMP on RHEL 7, allowing Nagios XI to track key system metrics effortlessly using its built-in SNMP monitoring capabilities.
Prerequisites
Ensure you have the following before starting:
- A RHEL 7 system with root or sudo privileges
- Nagios XI is installed and accessible
- SNMP Wizard enabled in Nagios XI
- Network access between the RHEL 7 server and Nagios XI
Step 1: Install SNMP on RHEL 7
1. To install SNMP and the required libraries, run:
sudo dnf install net-snmp net-snmp-utils -y2. After installation, verify the installed version:
snmpd -vStep 2: Configure SNMP Access
SNMP v2c Configuration
Backup config:
sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bakCreate a new config:
echo 'rocommunity Str0ngC0mmunity 10.25.5.12' > /etc/snmp/snmpd.confReplace Str0ngC0mmunity and 10.25.5.12 accordingly.
Restart SNMP:
systemctl restart snmpd.serviceSNMP v3 Configuration
Stop service:
systemctl stop snmpd.serviceCreate user:
sudo net-snmp-create-v3-user -ro -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy nagiosStart service:
sudo systemctl restart snmpd.serviceStep 3: Configure Firewall Rules
Allow SNMP traffic:
firewall-cmd --zone=public --add-port=161/udp --permanent
firewall-cmd --reloadVerify:
firewall-cmd --list-portsStep 4: Enable SNMP on Boot
sudo systemctl enable snmpd.serviceStep 5: Test SNMP Communication
From the Nagios XI server:
SNMP v2c:
snmpwalk -v2c -c Str0ngC0mmunity 10.25.5.12SNMP v3:
snmpwalk -v3 -u nagios -l authPriv -a SHA -A Str0ng@uth3ntic@ti0n -x AES -X Str0ngPriv@cy 10.25.5.12Expected output:
iso.3.6.1.2.1.1.1.0 = STRING: "Linux rhel7 3.10.0-1160.el7.x86_64"If no data is returned, check the firewall and SNMP config.
Step 6: Add RHEL 7 Host to Nagios XI
1. Log in to Nagios XI.
2. Navigate to Configure > Run a configuring wizard.
3. Select the Linux SNMP wizard.

4. Enter the RHEL 7 server’s IP address and SNMP credentials.

5. Select metrics to monitor (CPU, memory, disk, network traffic, etc.).
6. Apply the configuration and verify that Nagios XI is collecting SNMP data.
Common Issues & Fixes
SNMP Service is Not Running
1. Check logs for errors:
journalctl -u snmpd --no-pager | tail -202. Restart SNMP if necessary:
systemctl restart snmpd.serviceHost Appears “Down” in Nagios XI
1. Confirm SNMP is running:
systemctl status snmpd2. Check if port 161 is open:
firewall-cmd --list-ports3. Verify SNMP credentials in Nagios XI.
Conclusion
You’ve now configured SNMP on RHEL 7 for agentless monitoring in Nagios XI. This setup improves visibility into your server’s health and performance.
For additional resources:



