check_http
check_http
I am using nagios core 4.4.1 with nagios-plugins 2.2.1 in Debian 9
I want to use check_http command with SSL (443) but not work, could you help me?? How should I use the command for 443 port??
root@rdxnagios:~/nagios-plugins-release-2.2.1/plugins# /root/nagios-plugins-release-2.2.1/plugins/check_http -H xxxxxxx.domain.es -P 443
CRITICAL - Socket timeout
Port 443 in destination is opened.
I want to use check_http command with SSL (443) but not work, could you help me?? How should I use the command for 443 port??
root@rdxnagios:~/nagios-plugins-release-2.2.1/plugins# /root/nagios-plugins-release-2.2.1/plugins/check_http -H xxxxxxx.domain.es -P 443
CRITICAL - Socket timeout
Port 443 in destination is opened.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http
If it's SSL you likely need to change to
Also -P is for
port is
Code: Select all
/root/nagios-plugins-release-2.2.1/plugins/check_http -H xxxxxxx.domain.es -S
Code: Select all
-P, --post=STRING
URL encoded http POST data
Code: Select all
-p, --port=INTEGER
Port number (default: 80)
Re: check_http
Thanks!
Command works but in nagios.cfg get critical error
command line -> admnagios@rdxnagios:~$ /root/nagios-plugins-release-2.2.1/plugins/check_http -H 172.22.93.35 -P 443 -u https://xxxxxxxx/sctd/loginPage.do
HTTP OK: HTTP/1.1 200 OK - 63458 bytes in 0.055 second response time |time=0.054795s;;;0.000000 size=63458B;;;0
NAGIOS CONFIG:
commands.cfg
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}
webservices.cfg
define service{ ###### SCTD web
use local-service ; Name of service template to use
host_name RGPRDAPP1
# hostgroup_name websites
service_description HTTP_SCTD
check_command check_http!443!https://xxxxxxxx/sctd/loginPage.do
notifications_enabled 0
}
error in interface web -> CRITICAL - Socket timeout
Command works but in nagios.cfg get critical error
command line -> admnagios@rdxnagios:~$ /root/nagios-plugins-release-2.2.1/plugins/check_http -H 172.22.93.35 -P 443 -u https://xxxxxxxx/sctd/loginPage.do
HTTP OK: HTTP/1.1 200 OK - 63458 bytes in 0.055 second response time |time=0.054795s;;;0.000000 size=63458B;;;0
NAGIOS CONFIG:
commands.cfg
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ -p $ARG1$ -u $ARG2$
}
webservices.cfg
define service{ ###### SCTD web
use local-service ; Name of service template to use
host_name RGPRDAPP1
# hostgroup_name websites
service_description HTTP_SCTD
check_command check_http!443!https://xxxxxxxx/sctd/loginPage.do
notifications_enabled 0
}
error in interface web -> CRITICAL - Socket timeout
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http
Change the check_command to add the -S like I suggested, also the -u (URI) should not contain a fill URL, just the URI
Code: Select all
check_command check_http!443 -S!/sctd/loginPage.do
Re: check_http
Hello,
Option -S is not available.
check_http: Invalid option - SSL is not available
Option -S is not available.
check_http: Invalid option - SSL is not available
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http
Did you compile these plugins on a system without SSL support?afigles wrote:Hello,
Option -S is not available.
check_http: Invalid option - SSL is not available
Re: check_http
I installed openssl, how will be the steps after install openssl??
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http
You would want to follow the guide here
https://support.nagios.com/kb/article.php?id=569
https://support.nagios.com/kb/article.php?id=569
Re: check_http
I have compiled again but same problem.
Version OpenSSL -> OpenSSL 1.1.1a 20 Nov 2018
is possible that check_http will have to be compile/configure with other options for SSL??
Version OpenSSL -> OpenSSL 1.1.1a 20 Nov 2018
is possible that check_http will have to be compile/configure with other options for SSL??
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http
Did you install all the prerequisites for your OS based on the documentation?
depending on the OS you will need openssl-devel or libssl-dev before running
depending on the OS you will need openssl-devel or libssl-dev before running
Code: Select all
cd /tmp/nagios-plugins-release-2.2.1/
sudo ./tools/setup
sudo ./configure
sudo make
sudo make install