Would like the ability to pass windows variables to ping sensors. In my case I want to set the source (-S IP address) on a probe with multiple IPs/NICs, but I could see where other users would want to use other variables such as size, don't fragment, etc..


Article Comments

I have written a EXE/Script type sensor batch which manually gives me the ability to do what I have asked. Maybe Paessler could modify it and streamline/standardize it? Note the ping command in the script, which can be modified just like any windows ping command:

  • @echo off
  • for /f "tokens=3 delims=," %%# in ('ping -S source_interface_IP destination_IP 2^>nul^| findstr /i "loss average"') do (set "%%#")
  • for /f "tokens=1 delims= " %%a in ("%Average %") do SET _test=%%a
  • SET _result=%_test:0,-2%
  • ECHO %_result%:OK

Aug, 2020 - Permalink