This plugin tests the HTTP service on the specified host. It can test normal (HTTP) and secure (HTTPS) servers, follow redirects, search for strings and regular expressions, check connection times, and report on certificate expiration times.
...
Debugging
Info |
---|
|
In the following examples, you will see references to myproxyip and proxy_port. Please replace this information with your own proxy IP and port numbers. |
Debugging with curl
If you have trouble using check_http, you can start to query the URL with curl:
Code Block |
---|
|
curl -x 173.212.220.96:3128myproxyip:proxy_port https://www.google.decom/ --verbose |
Execute the active Check manually
...
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ cmk -N |grep http
check_command check_mk_active-http!'-u' 'https://www.google.decom/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128proxy_port' '173.212.220.96myproxyip' 'www.google.decom'
command_line /omd/sites/cme2/lib/nagios/plugins/check_http $ARG1$
command_name check_mk_active-http |
...
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ lq "GET services\nColumns:host_name description check_command_expanded\nFilter: host_name = localhost\nFilter: description = HTTPS HTTPS"
localhost;HTTPS HTTPS;check_mk_active-http!'-u' 'https://www.google.decom/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128proxy_port' '173.212.220.96myproxyip' 'www.google.decom' |
In both cases: Copy the parameters after the '!' for executing the command later.
...
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ ./check_http '-u' 'https://www.google.decom/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128proxy_port' '173.212.220.96myproxyip' 'www.google.decom' |
For a detailed log, you can use --verbose at the end of the command:
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ ./check_http '-u' 'https://www.google.decom/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128proxy_port' '173.212.220.96myproxyip' 'www.google.decom' --verbose |
For more information, you can use --help command flag.
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ ./check_http --help |
...