Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Step-by-step guide

  1. Configure the Check
    1. Setup → Services → HTTP, TCP, Email, ... → Check HTTP service

  2. Some important options
    1. Virtual host → is necessary if you have multiple domains one host running
    2. Use proxy → If you need a proxy to access the domain
    3. How to handle redirect → How to handle redirected pages
    4. HTTP Method → Set CONNECT if you're using a proxy
    5. Disable SNI

Debugging

Execute the active Check manually

There are several ways to access the command. One way is described here: Check Email (check_mail)

One other way is with cmk -N:

OMD[cme2]:~/lib/nagios/plugins$ cmk -N |grep http
  check_command                 check_mk_active-http!'-u' 'https://www.google.de/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128' '173.212.220.96' 'www.google.de'
  command_line                  /omd/sites/cme2/lib/nagios/plugins/check_http $ARG1$
  command_name                  check_mk_active-http

-> cmk -N will show you the nagios config. Active Checks in Checkmk are based on nagios.

One second way to access the command is via livestatus:
OMD[cme2]:~/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.de/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128' '173.212.220.96' 'www.google.de'


-> In both cases: Copy the parameters after the '!' for executing the comand later.

Now you need to run the check_http and to paste the copied parameters:

OMD[cme2]:~/lib/nagios/plugins$ ./check_http '-u' 'https://www.google.de/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128' '173.212.220.96' 'www.google.de'


For a detailed log you can use --verbose at the end of the command:

OMD[cme2]:~/lib/nagios/plugins$ ./check_http '-u' 'https://www.google.de/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' '3128' '173.212.220.96' 'www.google.de' --verbose


For more information you can use --help

OMD[cme2]:~/lib/nagios/plugins$ ./check_http --help


Debugging with curl

If you have trouble using check_http you can start to query the url with curl:

curl -x 173.212.220.96:3128 https://www.google.de/ --verbose








  • No labels