Hi.
Need a little help.
When we use Nagios command check_http with http site it works ok:
Command: check_http_pattern
Command line: $USER1$/check_http -I $HOSTADDRESS$ -u $ARG1$ -r $ARG2$
but if we wish to check https://internalsite.com we receive an error:
HTTP CRITICAL: HTTP/1.1 302 Found - pattern not found - 889 bytes in 0.037 second response time
Site also has redirection from http to https if that causes that error?
We have tried also putting in argument 1: http instead of https but still will not work.
please help.
with best regards
Check https not working
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check https not working
Yes, you may want to follow the redirect by adding the following to the commandbostjanc wrote:Site also has redirection from http to https if that causes that error?
Code: Select all
-f followRe: Check https not working
Hi.
Thank you for your reply.
If we run on Nagios server:
cd /usr/local/nagios/libexec/
./check_http -I "192.168.1.41" -u "https://oursite.com/Home/Ping" -r "OK"
HTTP CRITICAL: HTTP/1.1 302 Found - pattern not found - 889 bytes in 0.037 second response time |time=0.037284s;;;0.000000 size=889B;;;0
and if we run command:
./check_http -I "192.168.1.41" -u "https://oursite.com/Home/Ping" -r "OK" -f follow
CRITICAL - Socket timeout after 10 seconds
./check_http -I "192.168.1.41" -u "http://oursite.com/Home/Ping" -r "OK" -f follow
CRITICAL - Socket timeout after 10 seconds
Thank you for your reply.
If we run on Nagios server:
cd /usr/local/nagios/libexec/
./check_http -I "192.168.1.41" -u "https://oursite.com/Home/Ping" -r "OK"
HTTP CRITICAL: HTTP/1.1 302 Found - pattern not found - 889 bytes in 0.037 second response time |time=0.037284s;;;0.000000 size=889B;;;0
and if we run command:
./check_http -I "192.168.1.41" -u "https://oursite.com/Home/Ping" -r "OK" -f follow
CRITICAL - Socket timeout after 10 seconds
./check_http -I "192.168.1.41" -u "http://oursite.com/Home/Ping" -r "OK" -f follow
CRITICAL - Socket timeout after 10 seconds
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check https not working
How about
Code: Select all
./check_http -I "192.168.1.41" -H "oursite.com" -u "/Home/Ping" -S -r "OK" -f followRe: Check https not working
hi.
thank you for your reply.
If we run that command we receive an error:
check_http: Invalid option - SSL is not available
and if we run:
nmap nagiosSERVER.domain..com -p 443
Starting Nmap 6.40 ( http://nmap.org ) at 2019-11-07 00:15 PST
Nmap scan report for nagiosSERVER.domain.com (192.168.1.13)
Host is up (0.000071s latency).
PORT STATE SERVICE
443/tcp closed https
Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
which openssl
/usr/bin/openssl
Does Nagios server needs SSL enabled if we want to check SSL site (our web server)?
Running nmap to check webserver from nagios:
If we run on nagios:
nmap IP-OF-WEB-SERVER -p 443
Starting Nmap 6.40 ( http://nmap.org ) at 2019-11-07 00:17 PST
Nmap scan report for webserver.domain.com (192.168.1.41)
Host is up (0.00032s latency).
PORT STATE SERVICE
443/tcp open https
MAC Address: AC:1F:6B:C5:51:EC (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
thank you for your reply.
If we run that command we receive an error:
check_http: Invalid option - SSL is not available
and if we run:
nmap nagiosSERVER.domain..com -p 443
Starting Nmap 6.40 ( http://nmap.org ) at 2019-11-07 00:15 PST
Nmap scan report for nagiosSERVER.domain.com (192.168.1.13)
Host is up (0.000071s latency).
PORT STATE SERVICE
443/tcp closed https
Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
which openssl
/usr/bin/openssl
Does Nagios server needs SSL enabled if we want to check SSL site (our web server)?
Running nmap to check webserver from nagios:
If we run on nagios:
nmap IP-OF-WEB-SERVER -p 443
Starting Nmap 6.40 ( http://nmap.org ) at 2019-11-07 00:17 PST
Nmap scan report for webserver.domain.com (192.168.1.41)
Host is up (0.00032s latency).
PORT STATE SERVICE
443/tcp open https
MAC Address: AC:1F:6B:C5:51:EC (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds
Re: Check https not working
Hi.
Just wanted to let you know that I had solved problem with commands:
cd /tmp/nagios-plugins-2.1.1/
./configure --with-openssl=/usr/bin/openssl
make
make install
thanks for all the help!!!
Just wanted to let you know that I had solved problem with commands:
cd /tmp/nagios-plugins-2.1.1/
./configure --with-openssl=/usr/bin/openssl
make
make install
thanks for all the help!!!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check https not working
Great!bostjanc wrote:Hi.
Just wanted to let you know that I had solved problem with commands:
cd /tmp/nagios-plugins-2.1.1/
./configure --with-openssl=/usr/bin/openssl
make
make install
thanks for all the help!!!
Locking thread