View Full Version : Monitoring sites with a simple ping - how to
eseltzer
07-09-2005, 03:16
I am trying to use zabbix to monitor about 240 remote sites. I would like to ping the sites, if they are down for more than 5 minutes or so I would like an email or text page to go out. Will zabbix do this. Does a comprehensive guide exist to get someone through this?
Thanks,
James Wells
07-09-2005, 05:37
Greetings,
Yes, Zabbix is very good at this. Very simple steps to get this going;
Go into the Zabbix frontend and select configuration -> hosts.
Scroll down near the bottom, you will find a form for adding hosts. At this point, you want to create a template for simplification. For hostname, use something like '__Remote_Hosts', then down at then select the drop down where it shows Monitored. Change this to Template.
Then click Add.
When the page reloads, click on the '__Remote_Hosts' host, this will bring up a list of items that are currently being monitored. At present there should be none.
Next, you use the form to create a ping item for the '__Remote_Hosts' template.
In the description field, just use something like 'Remote Ping'
Leave the Host field alone, this field will be updated automagically when you begin linking hosts to this template
For type, you want to use 'Simple check' and then for the key, you want to use icmpping.
Skip units and use multiplier, and move to update interval. This simply controls the periodicity of the checks, I recommend something like 30 - 45 here. Then click 'Add'
Next we move on to creating the trigger against this items. Click on 'Triggers' up near the top. On the right hand, near the top, you will see a drop down for hosts. Use the drop down and select '__Remote_Hosts'. This will bring up a list of the triggers associated with this host. At present there should be none.
In the form, create a description, something like '{HOSTNAME} -- Failed Ping Check'.
For expression, you want to use something like;
{__Remote_Hosts:icmpping.max(300)}<1
Choose a severity level, then click add. You're almost done. Next you want to click on 'Actions' next to your new trigger. This will allow you to configure your email alert.
From the 'Send message to' drop down, choose whether you wnt this email to go to a group or to an individual.
From the 'User' or 'Group' drop down, choose which user or group you want the alert to go to.
Change the 'Subject' to '{HOSTNAME} -- Failed Ping Check' Then click add.
Okay, now you add the individual hosts, very similar to the way you created the first template. The only difference is this time, instead of choosing template in the dropdown, you use 'Monitored' and for the last drop down, you select '__Remote_Hosts' as the template. Click add and you are done.
I hope this helps.
EDIT: Corrected the trigger.
troyadams
07-09-2005, 13:58
Im pretty much trying to do the same thing. I have followed your steps, but the ping check just sits in the queue. Any ideas??
Also on the host, what port number do i use. The host is not running an agent (its a cisco router)
James Wells
07-09-2005, 14:40
Im pretty much trying to do the same thing. I have followed your steps, but the ping check just sits in the queue. Any ideas??
Also on the host, what port number do i use. The host is not running an agent (its a cisco router)
The simple check icmpping uses the fping utility, if that utility does not exist on your server, then the checks will just sit in the queue like you are seeing. If fping does exist, and you have the path set correctly in your zabbix_server.conf file, then the next thing to check is if you have a firewall blocking the pings.
Also this monitor, as configured, uses the standard ICMP ping, as such, you only need to allow ICMP traffic through the firewall. Most Cisco routers are configured to respond to pings by default.
troyadams
07-09-2005, 22:57
Great, thanks for the info. I will give that a go.
So i dont need to worry about the port on the host config screen? I.E Just leave the port at 10000.
James Wells
07-09-2005, 22:59
So i dont need to worry about the port on the host config screen? I.E Just leave the port at 10000.
If all you are doing is ping checks, then no, no need to change the port. Keep in mind that ping uses the ICMP protocol. which doesn't use ports, as most people think of them.
eseltzer
10-09-2005, 12:12
I did the above and did not get any errors. Nothing in the queue, how do I confirm it is working? Also where do I set up all the users and smtp info?
James Wells
10-09-2005, 16:29
One of the ways you can check to see if it is working is to go to view -> latest data. On the right hand side, you will see a drop down list, select one of the hosts you are checking, then in the drop down to the right of it, select data. This will show you if it is working.
As for setting up users, you go to configuration -> users and add the users there.
James,
Thanks much for the howto. I'm running the 1.9b and attempted to follow your instructions, however I've run into a snag. Everytime I try to create the trigger, I get the following error:
No such host (_Remote_Hosts) or monitored parameter (icmpping)
I've followed your instructions more or less exactly, including using the same name _Remote_Hosts. I believe that your instructions might have been geared to 1.0, so I might have missed something.
When I check under hosts -> templates, I can see the _Remote_Hosts template, so I don't think thats whats giving the error. Did the icmpping parameter change names in the beta?
Thanks for any help you can give me.
brian
disregard my post. All I had to do to notice I misspelled my key in the item was open my mouth in a public forum... :mad: :rolleyes:
Thanks again for the howto james.
brian
{__Remote_Hosts:icmpping.max(300)}<1
For some reason this does not work for me. When I change the trigger I've been using until now (icmpping.last(0)<1) to this, the trigger status is set to unknown and it never becomes false or true. Any ideas why?
What is type of the ICMPPING item? There is a known issues with evaluation of aggregate functions having integer values. Please wait for 1.1beta10.
lifezard
15-05-2006, 10:37
For some reason this does not work for me. When I change the trigger I've been using until now (icmpping.last(0)<1) to this, the trigger status is set to unknown and it never becomes false or true. Any ideas why?
Hi,
I think I am facing the same problem as well. (I m monitoring a couple of Quintums in my case)
While Latest Values does show 1 or 0 for icmpping checks depending whether the machine s on or off, the Trigger section (I set it to {server:icmpping.max(500)}=0) will forever remain unknown)
As I need to distinguish situation when the whole thing is down or just a reboot, I ve made a bit of adjustment... by setting the interval to longer period and modifying the expression a bit:
({Quintum1:icmpping.last(0)}<1)&({Quintum1:icmpping.prev(0)}<1)
I still hope the original will work though eventually though
I personaly solved it by using a float value for the ping item