We have remote sites that 4 hosts but I want to receive a notification only when 2 of the 4 hosts are down (cannot ping them at the same time), so how can we archive this with PRTG (verion 8)?
Thanks,
Article Comments
You could do this by writing a script that pings all 4 servers and adds 1 to a variable for each server that replies. Export that variable in brackets to a web page and use an HTTP sensor to read and plot that variable. Then you can set an alert on that HTTP sensor to notify you if the total count falls below 3.
In pseudo-code:
Count == 0 If (return value of ping) = 0 /*Successful ping*/ then Count == Count +1 echo "[" Count "]" > PingCount.html exit
Aug, 2011 - Permalink
This can be done with Custom Sensor PTF.SensorCount
With this sensor you can count the number of down sensors (or any other state) in a particular group.
So if you place the ping sensors of your 4 hosts in one group, PTF.SensorCount will tell you how many of them are down.
Enabling limits of this sensor (in the channels tab) will let you determine when a notification is send.
Jul, 2011 - Permalink