Page 1 of 2

How to set up monitoring of the URL

Posted: Mon Jan 13, 2020 1:45 am
by Pratapa
Hi,

We have a requirement. We need to set up monitoring of the URL

https://fs.anz.com/adls/ls/idpinitiatedsignon.aspx?

Please suggest how to set up monitoring of this URL. We are using Nagios core.


We tried a few options.

./check_http -H host1 -u https://fs.anz.com/adls/ls/idpinitiatedsignon.aspx? -S
CRITICAL - Cannot make SSL connection.

./check_http -H host1 -u fs.anz.com/adls/ls/idpinitiatedsignon.aspx? -S
CRITICAL - Cannot make SSL connection



Following is the check_http version.

[root@nagiosserver libexec]# ./check_http -V
check_http v2.2.1 (nagios-plugins 2.2.1)

Re: How to set up monitoring of the URL

Posted: Mon Jan 13, 2020 9:45 am
by scottwilkerson
The -u flag is supposed to be a URI, not a full URL

How about this?

Code: Select all

./check_http -H fs.anz.com -u "/adls/ls/idpinitiatedsignon.aspx?" -S

Re: How to set up monitoring of the URL

Posted: Mon Jan 13, 2020 11:47 pm
by Pratapa
We tried this, but we are getting below error.

#./check_http -H fs.anz.com -u "/adls/ls/idpinitiatedsignon.aspx?" -S
CRITICAL - Cannot make SSL connection.

We tried some other options but we are getting error.

# ./check_http -H 10.211.50.12 -S
CRITICAL - Cannot make SSL connection.

#./check_http -H host1 -S
CRITICAL - Cannot make SSL connection.

./check_http -H 10.211.50.12
HTTP WARNING: HTTP/1.1 404 Not Found - 492 bytes in 0.062 second response time |time=0.061986s;;;0.000000 size=492B;;;0

./check_http -H host1
HTTP WARNING: HTTP/1.1 404 Not Found - 492 bytes in 0.007 second response time |time=0.006633s;;;0.000000 size=492B;;;0

10.211.50.12 is the IP address of the host1.

Re: How to set up monitoring of the URL

Posted: Mon Jan 13, 2020 11:55 pm
by Pratapa
host1 is the windows server.

Re: How to set up monitoring of the URL

Posted: Tue Jan 14, 2020 8:12 am
by scottwilkerson
Can you show the output of the following

Code: Select all

curl "https://fs.anz.com/adls/ls/idpinitiatedsignon.aspx?" -vvv

Re: How to set up monitoring of the URL

Posted: Wed Jan 15, 2020 1:13 am
by Pratapa
We are not supposed to share client's data here.

I asked user, what is the web server you are using and on which port it is running.

User replied that web server is HTTP.sys and the port no. is 443

Re: How to set up monitoring of the URL

Posted: Wed Jan 15, 2020 7:31 am
by scottwilkerson
Pratapa wrote:We are not supposed to share client's data here.
That's understandable but can you curl the URL like above?

Re: How to set up monitoring of the URL

Posted: Thu Jan 16, 2020 3:51 am
by Pratapa
scottwilkerson wrote:
Pratapa wrote:We are not supposed to share client's data here.
That's understandable but can you curl the URL like above?
Yes we can curl the URL

Following are the few lines from the output.

Connected to fs.anz.com (10.211.50.12) port 443

HTTP/1.1 200 OK

Connection #0 to host fs.anz.com left intact

Re: How to set up monitoring of the URL

Posted: Thu Jan 16, 2020 7:46 am
by scottwilkerson
Ok, can you reach the root with check_http?

Code: Select all

./check_http -H fs.anz.com -S

Re: How to set up monitoring of the URL

Posted: Fri Jan 17, 2020 12:52 am
by Pratapa
No.

Following is the output.
#./check_http -H fs.anz.com -S
CRITICAL - Cannot make SSL connection.