I have to indirectly monitor the proper operation of an URL filtering appliance. It means that I cannot access its dashboard or log viewer.

The idea is to use

https://github.com/StevenBlack/hosts/raw/master/alternates/fakenews-gambling-porn/hosts

and to access each listed URL having an "alert" as soon as an URL is reachable (and so escaping from the URL filtering check of the appliance).

It would be useful a command line program to be used into a batch from PRTG.

I would also ask if you can suggest a GUI application to monitor multiple URL retrieving them from a list (the hosts file).

Thanks a lot in advance Gian


Article Comments

Hi there,

Thank you very much for your request.

This is unfortunately nothing that can be done with PRTG by nature and would require a self-written custom sensor that checks each URL and provides the results in a PRTG compliant way to it.

Best regards,
Sebastian


Jun, 2019 - Permalink

Thank you sir.

Just to share (thus I am still not able to benefit through PRTG) this is the solution I have built:

@echo off
for /F %%g in (%1 %2 %3 %4 %5 %6 %7 %8 %9) do (
echo %%g
curl --silent --insecure --head -x 172.30.1.2:8080 --proxy-user esposito.g-ati:Bergamo71! -L %%g | grep HTTP/ | tail -1 | grep -o "[0-9][0-9][0-9]"
)

As you can notice it needs curl.exe, grep.exe and tail.exe (by means of CYGWIN, for example).

Save it as a Windows batch file (say "urltest.bat") and run it passing a filename (containing URLs to test) as a parameter.

So, if your url2check.txt file contains the following entries (URLs):

www.youporn.com
www.google.com
www.redtube.com

you will run

C:\> urltest.bat url2check.txt

and it will return

www.youporn.com
404
www.google.com
200
www.redtube.com
404

where 200 will indicate that the URL has been reached, and anything other will NOT.

Kind regards,
Gian


Jun, 2019 - Permalink