How to set up monitoring of the URL

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

How to set up monitoring of the URL

Post 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)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to set up monitoring of the URL

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: How to set up monitoring of the URL

Post 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.
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: How to set up monitoring of the URL

Post by Pratapa »

host1 is the windows server.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to set up monitoring of the URL

Post by scottwilkerson »

Can you show the output of the following

Code: Select all

curl "https://fs.anz.com/adls/ls/idpinitiatedsignon.aspx?" -vvv
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: How to set up monitoring of the URL

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to set up monitoring of the URL

Post 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?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: How to set up monitoring of the URL

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to set up monitoring of the URL

Post by scottwilkerson »

Ok, can you reach the root with check_http?

Code: Select all

./check_http -H fs.anz.com -S
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Pratapa
Posts: 144
Joined: Tue Oct 01, 2019 1:33 am

Re: How to set up monitoring of the URL

Post by Pratapa »

No.

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