Page 1 of 1

how to scape # with check_http

Posted: Mon Feb 04, 2019 9:47 am
by iam33
Thanks in advance,

I´m trying to monitor an URL that contains an # and when I execute tje check_http can´t resolve it correctly, if I try with wget there isn´t problem to do that.

This is the command that I´m executing to try:

Code: Select all

check_http -H pruebas.es -S -u /raSaasUserPortal/web/console.html#/login -w 1 -c 4
I have probed to scape with "" and '' and \ :

Code: Select all

	check_http -H pruebas.es -S -u "/raSaasUserPortal/web/console.html#/login" -w 1 -c 4

	check_http -H pruebas.es -S -u "/raSaasUserPortal/web/console.html\#/login" -w 1 -c 4

	check_http -H pruebas.es -S -u '/raSaasUserPortal/web/console.html#/login' -w 1 -c 4

	check_http -H pruebas.es -S -u '/raSaasUserPortal/web/console.html\#/login' -w 1 -c 4
Thanks a lot!

Re: how to scape # with check_http

Posted: Mon Feb 04, 2019 5:50 pm
by ssax
Does this work?

Code: Select all

/usr/local/nagios/libexec/check_http -H pruebas.es -S -u '%2FraSaasUserPortal%2Fweb%2Fconsole.html%23%2Flogin' -w 1 -c 4
Or this?

Code: Select all

/usr/local/nagios/libexec/check_http -H pruebas.es -S -u '%2FraSaasUserPortal%2Fweb%2Fconsole.html%23%2Flogin' -w 1 -c 4 --sni
Or this?

Code: Select all

/usr/local/nagios/libexec/check_http -H pruebas.es -S -u '/raSaasUserPortal/web/console.html%23/login' -w 1 -c 4 --sni

I just URL Encoded it with this:

https://meyerweb.com/eric/tools/dencoder/