Hi,
Another question. What is the best way to monitor when an IP address becomes responsive?
I want to be able to know when a particular backup DLS line becomes active as it is a backup line and not on normally.
Thanks
John
Article Comments
Hi,
This can be done with a batch file sensor.
In the "Custom Sensors\EXE" folder of your PRTG installation, create a new file called PingReverse.bat and paste the following code.
@echo off ping -n 1 %1|Findstr /I /C:"timed out" /C:"host unreachable" > null if %errorlevel% == 0 goto error echo 0:Device is online rem set sensor to error by returning 2 exit 2 goto end :error echo 0:Device is offline rem set sensor to Ok by returning 0 exit 0 :end
You might need to change the "timed out" and "host unreachable" strings to meet the localized output of your ping command.
Note: do NOT name the batch file ping.bat, this will create an endless loop.
Regards,
Jun, 2012 - Permalink
If the device has got an open port, when it is running, you can use a port sensor. In the settings you can set "Goal" to "Closed". Now the sensor is green, if the port is unavailable and it becomes red, as soon as the port opens. You can now use a notification if the sensor goes into error state.
Jun, 2012 - Permalink