Problems with events and responses


17-08-2004 08:18:55


i have some problems getting netmrg to function correctly with my set responses.

i added a monitor "Ping Latency" and defined 3 events highping (curval > 200), offline (curval = 0), and normal (curval >1 && < 200).. i set responses to send an email when the event is triggered.. (trigger options -> on change)

but when i filter the host i monitor, there is nothing triggered and i don't get my notification..

did i miss something?
any hints?


17-08-2004 21:55:47

If you're using the script, my quick test has it returning an empty line on failure, which should be parsed as a "U" (undefined/unknown value). As such, the "= 0" test should not match it.

If you can confirm that's your problem, we should probably change the script to return something like -1 when it fails, so that we can test for that, and say that the host is down.


13-09-2004 20:20:31

the script has a bug, i changed the script like this

# Return average ping time

($ip) = @ARGV;

@result = `ping -n -c 6 -i 0.2 -w 3 $ip 2>/dev/null`;
$result = $result[$#result];
$result =~ s/.*= //;
$result =~ s/\/.*//;
if ($result <= 0)
elsif ($result eq "")
print "U";
else {

now it works fine.