Nagios is used by Linux System Administrator for Network Monitoring Services. SNMP is abbreviated as Simple Network Management Protocol and a set of rules of network for managing complex networks in this tutorial we are dealing with the how to install and integrate the SNMP with the Nagios 11 to monitor the Remote Linux Machines.

How to Monitor Remote Linux Machines using SNMP on Nagios 11?

Step-I ( Starting of Remote Linux Machines and Login using root Credentials)
Step-II (Installation of SNMP on respective Remote Linux Machine)
On CentOS / RHEL / Scientific Linux / Oracle Linux 7/6/5 and all RPM based Systems
# yum install net-snmp
On Ubuntu Server / Debian / Linux Mint / Pear OS / Kali Linux and all DEB based systems
# apt-get install snmpd
Step-III (Create the snmpd.conf file and add the following lines on it)
# cd /etc/snmp
# cp snmpd.conf snmpd.conf.bak
# vim snmpd.conf
Add the following lines
# rocommunity public <Your Nagios IP Address>/<Port Number of Nagios>

:wq (Save and Exit)

Step-IV (Restart the snmpd Services)
On CentOS / RHEL / Scientific Linux / Oracle Linux 7/6/5 and all RPM based Systems
# service snmpd restart
On Ubuntu Server / Debian / Linux Mint / Pear OS / Kali Linux and all DEB based systems
# /etc/init.d/snmpd restart
Step-V (Edit the Firewall Settings)
On Firewall Settings White-list the SNMP UDP Port 161 to allow queries
Using IPtables command
# iptables -I INPUT -p udp –-destination-port 161 -j ACCEPT /etc/init.d/iptables save
Modifying host file
# vim /etc/hosts.allow
add the allowed address of Nagios host Here on port 161
Step-VI (Add SNMP daemon automatically on every system restart)
On CentOS / RHEL / Scientific Linux / Oracle Linux 7/6/5 and all RPM based Systems
# chkconfig snmpd on
On Ubuntu Server / Debian / Linux Mint / Pear OS / Kali Linux and all DEB based systems
# /etc/init.d/snmpd start
Step-VII (Check whether SNMP is Configured Properly or Not)
# cd /usr/local/nagios/libexec
# ./check_snmp_storage.pl -H <Your  SNMP IP Address>

Final Results

  • If it is Configured Properly : Above command return data
  • If It is not Configured Properly : Above command doesn’t return data

Congratulations now you have installed and integrate the SNMP with the Nagios 11 to monitor the Remote Linux Machines. Also Read How to Install & Integrate NRDP Addon on Nagios Core / 11 .