Share this post
Tucker Falen
Table of Contents
How to Configure SNMP on SUSE 12 and Monitor with Nagios XI
|
Tucker Falen
![](https://library.nagios.com/wp-content/uploads/2025/02/opensuse_shutterstock_2292495083.jpg)
SNMP (Simple Network Management Protocol) is a commonly used protocol for monitoring and managing network devices and servers.. If you want to integrate SNMP monitoring on your SUSE Linux Enterprise Server (SLES) 12, this guide will walk you through the installation, configuration, and testing of SNMP, ensuring your system is ready to send monitoring data to Nagios. This article will be using SNMPv2c!
Step 1: Install SNMP Packages
SNMP is most likely pre-installed on your system, but just in case. To install SNMP on SUSE 12, you need to install the Net-SNMP package, which includes the SNMP daemon (snmpd
) and useful command-line tools like snmpwalk
and snmpget
.
Run the following command to install the necessary packages:
sudo zypper install net-snmp net-snmp-utils
This will install:
- snmpd: The SNMP daemon that collects system data
- snmpwalk, snmpget, snmptrap: Utilities for querying SNMP data
Step 2: Configure SNMP Daemon
After installing SNMP, you must configure it to allow access from the monitoring system.
- Open the SNMP configuration file:
sudo vi /etc/snmp/snmpd.conf
- Look for the
rocommunity public
line and modify it to allow your monitoring system’s IP. For example, if your Nagios server is at 192.168.1.146, change:
![How to Configure SNMP on SUSE 12 and Monitor with Nagios XI 1 Screenshot 2025 02 12 103406 edited](https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-12-103406-edited.png)
rocommunity myCommunityString 192.168.1.146
Replace myCommunityString
with a strong community string.
![How to Configure SNMP on SUSE 12 and Monitor with Nagios XI 2 Screenshot 2025 02 12 103249](https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-12-103249.png)
Note: If you want to allow access from any system (not recommended for security), use:
rocommunity myCommunityString default
Once you are done editing your file, save and exit (ESC
, then :wq
).
Step 3: Enable and Start SNMP Service
After configuring SNMP, enable and start the service so it runs automatically on boot:
sudo systemctl enable snmpd
sudo systemctl start snmpd
Check if SNMP is running:
sudo systecmctl status snmpd
![How to Configure SNMP on SUSE 12 and Monitor with Nagios XI 3 Screenshot 2025 02 12 103640](https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-12-103640.png)
Step 4: Open Firewall for SNMP
SNMP uses UDP port 161. If your monitoring server is external, allow this port through the firewall:
sudo /usr/sbin/SuSEfirewall2 open EXT UDP 161
sudo systemctl restart SuSEfirewall2.service
If using firewalld
, run:
sudo firewall-cmd --zone=public --add-source=<YOUR-IP-ADDRESS> --permanent
sudo firewall-cmd --zone=public --add-port=161/udp --permanent
sudo firewall-cmd --reload
Step 5: Test SNMP Configuration
Once SNMP is installed and configured, test it using snmpwalk
on your Nagios XI server.
Test from Your Monitoring Server (e.g., Nagios)
If running the test from your Nagios server, replace <SUSE_SERVER_IP>
with your SUSE server’s IP:
snmpwalk -v 2c -c myCommunityString <SUSE_SERVER_IP>
If you see a lot of HOST-RESOURCES-MIB
data, SNMP is working correctly!
Step 6: Monitor with Nagios
From your Nagios XI web interface home page, click on Run a Wizard.
![How to Configure SNMP on SUSE 12 and Monitor with Nagios XI 4 Screenshot 2025 02 11 102801 1](https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-11-102801-1-1024x538.png)
Then, scroll until you find the Linux SNMP wizard.
![How to Configure SNMP on SUSE 12 and Monitor with Nagios XI 5 Screenshot 2025 02 12 141405](https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-12-141405-1024x528.png)
Then enter the IP address of your SUSE 12 machine. Leave the SNMP version at 2c and the SNMP Port at 161. The SNMP Community is where you will enter the community string you created in the conf file in Step 2.
![How to Configure SNMP on SUSE 12 and Monitor with Nagios XI 6 Screenshot 2025 02 12 142445](https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-12-142445.png)
Now, you can change any settings you need and choose which metrics you would like to monitor.
![How to Configure SNMP on SUSE 12 and Monitor with Nagios XI 7 Screenshot 2025 02 12 142349 1](https://library.nagios.com/wp-content/uploads/2025/02/Screenshot-2025-02-12-142349-1-1024x568.png)
By default, you will be monitoring some basic services. When you are done configuring your settings and choosing SNMP services to monitor you can hit Next, and then Finish with Defaults.
Congratulations! You have successfully installed and configured SNMP on SUSE 12 and integrated it with Nagios. Your server is now actively monitored for performance metrics like CPU, memory, and uptime.