Friday 24 May 2013

Monitoring Router or Other Devices using Simple check with Ping (ICMP) in Zabbix


Monitoring Router or Other Devices using Simple check with Ping (ICMP) in Zabbix

For ICMP check Zabbix required different utility for Ping (ICMP echo  ) that is fping. To support Zabbix to simple check you have to first install fping and set the location for fping

fping :- fping is a ping-like program which can determine the accessibility of multiple hosts using ICMP echo requests. fping is designed for parallelized monitoring of large numbers of systems, and is developed with ease of use in scripting in mind.

Install fping :-

You can install fping with following command :-

# yum install fping

Or You can install it by tarbell file

Download find from http://fping.sourceforge.net/


# tar -zxvf fping.tar.gz
# cd fping-2.4b2_to/
# ./configure
# make
# make check
# checkinstall
OR
# make install


Note:- Zabbix server must know where to find fping and be able to execute it.

First check the correct path of fping and then modify zabbix_server.conf file for correct path

# whereis fping
fping: /usr/local/sbin/fping

Now give necessary permission  
# ls -l /usr/local/sbin/fping
-rwxr-xr-x 1 root root 48903 Jun  2 11:01 /usr/local/sbin/fping
# chgrp zabbix /usr/local/sbin/fping
# ls -l /usr/local/sbin/fping
-rwxr-xr-x 1 root zabbix 48903 Jun  2 11:01 /usr/local/sbin/fping
# chmod 4710 /usr/local/sbin/fping
# ls -l /usr/local/sbin/fping
-rws--x--- 1 root zabbix 48903 Jun  2 11:01 /usr/local/sbin/fping

# vi /etc/zabbix/zabbix_server.conf

FpingLocation=/usr/local/sbin/fping

Now restart zabbix server service for changes take effect .

# service zabbix_server restart
Now Zabbix is ready for simple icmp check.

Now open http://ip-address/zabbix and Login to Zabbix as admin

If you have not already added host add it first before creating item

Crate New Host for Router.

To crate new host go to configuration | Hosts and Select Create Host. In New host form type the host name of Router. Basically Router and switch are SNMP supported devices so select SNMP Devices in Group field. Then type the IP Address of Router and then Save the host.

Now we have added Router to our Zabbix monitoring software but it not knowing what to check so for that we have to create item to know Zabbix what to check and using which method. We can be monitor Router using SNMP or by simply sending ping request.

 For now we check our router is live or not using simple check.

So click Item next to Route we just added and then click Crate Item. In Crate Item new form Host is already selected as your router. In description box type the description for the test. For example  Network Reachability using ping . In Type drop down box select Simple Check . In key box type icmpping. In type of information drop down menu select Numeric (float). In Units box type ms . In update interval (in Sec) change it to 60 and show value drop down menu select host status and save the item by clicking Save.

Now we have created test to check network reachability of router. Now we want zabbix have to send a mail if router is unreachable for that we have to create trigger and action. Because we have already configured action for trigger; we have to crate trigger for newly created item. So for that click on trigger next to Router we have added and click Create Trigger . In new Trigger form type the identical information that sense as what is wrong
Type that in Name field. For, example Router is down or unreachable.
In expression field click add this will open new page for condition. Click Select next to item box and then select item we just created Network Reachability using ping and then click insert and then click save.


Now when ever our router get down or unreachable Zabbix will send mail saying that Router is down or unreachable.

No comments:

Post a Comment