To monitor Linux/Centos host systems with Nagios using SNMP you have to install net snmp packages that are used to communicate between nagios server and linux host systems. SNMP is associate degree methodology of observance. Network devices, servers are commonly preferred to put in with dedicated agents on the right track machines.
First, you have to install the net-snmp package on the Linux/Centos machine. Login to the Linux machine as root user and configure snmp on linux by following the step-by-step process. Installation and configuration of SNMP on linux/Centos:
Step 1 : Installation of net snmp.
Step 2 : Edit SNMP configuration file.
Step 3 : Edit firewall setting.
Step 4 : Check communication between server and host.
To start the configuration of snmp on linux machine follow the process:
Step 1 : Install net-snmp packages
#yum install net-snmp
Step 2 : Edit snmp.conf file in /etc/snmp/
Add these commands at the end of the file:
|com2sec local localhost solutions
com2sec local 192.168.1.4 solutions
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
view all included .1 80
access MyRWGroup “” any noauth exact all all none
pass .188.8.131.52.4.1.4413.4.1 /usr/bin/ucd5820stat
save and restart snmpd services
Step 3 : Edit your firewall setting on host linux machine
#iptables –IINPUT –p udp –destination-port 161 –j ACCEPT
Some linux machines may also need to add ipadress of the nagios server to allow the host file located at (/etc/hosts.allow)
Start snmp daemon services
#chkconfig snmpd on
Step 4 : Now login on the linux server (.i.e.nagios server) and check snmp configuration is completed correctly.
Check the snmp communication between nagios server and linux host
Syntax to check services:
|Syntax:- ./check_ping -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%% [-p packets] [-t timeout] [-L]
Syntax:-./check_load -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
Syntax:- ./check_imap -H host -p port [-w warn_time] [-c crit_time] [-s send] [-e expect] [-W wait] [-t to_sec] [-v]
./check_ping -H 192.168.1.2 -w 2,7%% -c 10,20%% -t 20
./check_load -w 30,60%% -c 40,80%%
./check_imap -H 192.168.1.2 -p 22 -w 10 -c 3 -s 5 -e 6 -W 8 -t 60
For more detail you can watch video and also subscribe for more Videos :