PDA

View Full Version : ping


krusty
29-11-2005, 12:05
Hi im looking to a trigger that shows the average. I the average is higher then 120 ms i want to send an email.

I use the following trigger but it dosenīt work. Have anyone idea?

{HOST:icmpping.avg(0)}>120

icmpping is just a simple check

Nate Bell
29-11-2005, 15:39
icmpping just returns a binary value, either 0 (no ping) or 1 (ping), so the average of icmpping is going to be at most 1. I use a bash script to ping a site/host three times, and return the average time. Here's the script I use:

#!/bin/bash
#pingtime.sh
ping -c3 -W10 $1 &> /tmp/pingtime.dmp
grep avg /tmp/pingtime.dmp | cut -d"/" -f5

Now create a UserParameter:

UserParameter=pingtime ,/locationofzabbixscripts/pingtime.sh

You can now create an item in Zabbix like so:

pingtime[google.com]
and this item will return the average time it took to ping google.com 3 times.

That's my method at least. Hope you find some use in it.

Nate

krusty
29-11-2005, 15:56
Thanks for posting. I will check this in the evening. I give you report about it.

Greez

krusty
30-11-2005, 09:21
Hi,

I got the following error in zabbix_server.log:

031256:20051130:085700 Simple check [check_service[pingtime[192.168.0.4],192.168.0.5]] is not supported
031256:20051130:085700 Parameter [pingtime[192.168.0.4]] is not supported by agent on host [testhost1]

I installed a new simple check with key "pingtime[192.168.0.4]". Whatīs my mistake?

Krusty

James Wells
30-11-2005, 14:41
Greetings,
Hi im looking to a trigger that shows the average. I the average is higher then 120 ms i want to send an email.
Create a simple check of item icmppingsec, then create a trigger based on this. The trigger, based on your previous exmple would be something like;
{HOST:icmppingsec.avg(30)}>0.12
This will trigger if the ping time between the Zabbix server and HOST, averages higher than 120ms over a period of 30 seconds.

A word of warning though. 120ms is not a lot of variance when it comes to network latency. Expect this trigger to activate often, unless you are running a gigabit network.

krusty
30-11-2005, 14:59
Thanks for your discription but i located a problem.

When I show graph of the trigger there is only 0.00. Can i check the value manually in zabbix?

krusty
01-12-2005, 10:03
I found my mistake. I check one host in my own LAN an the ping is only 3ms :D
If i check the values of the last hour i get values of 0.0024 and so on.
Sorry for my stupid post. :cool:

sauron
01-12-2005, 10:26
KISS:


icmppingsec Return ICMP ping response time Number of seconds Example: 0.02


http://www.zabbix.com/manual/v1.1/config_items.php

krusty
02-12-2005, 12:53
@sauron

you are so right. After i have fix the problem i watch the manual and i found the discription. :D

nobody is perfect. :rolleyes:

Nate Bell
02-12-2005, 19:33
Apparenly, I like doing things the hard way. :)

Nate