...
...
...
...
...
...
Info |
---|
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. |
Status |
---|
colour | Green |
---|
title | LAST TESTED ON CHECKMK 2. |
---|
|
...
Panel |
---|
borderColor | black |
---|
bgColor | #f8f8f8 |
---|
title | Important OptionsTable of Contents |
---|
|
|
Note |
---|
check_http has many valuable configuration options. Please click here for some of the more common ones. |
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 number. |
...
There are several ways to access the command. One way is described here: Configuring Check Email (check_mail)#ExecuteactiveCheckmanually
One other way is with cmk -N:
...
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ ./check_http '-u' 'https://www.google.com/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' 'proxy_port' 'myproxyip' 'www.google.com' |
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.com/' '--ssl' '--onredirect=follow' '-j' 'CONNECT' '--sni' '-p' 'proxy_port' 'myproxyip' 'www.google.com' --verbose |
For more information, you can use --help command flag.
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ ./check_http --help |
Debugging Regular Expressions (Regex)
Note |
---|
|
If there is any client-side or Javascript-related content, Checkmk will not be able to parse this information with regular expressions. |
In the following example, we are using regular expressions on status.cloud.google.com to gather Access Content Manager information.
Image Modified
The service check returns OK
...
Image Added
Running the command by hand can help debug issues as well.
Code Block |
---|
|
OMD[mysite]:~/lib/nagios/plugins$ ./check_http -u /regional/americas --ssl -l -R 'Access Context Manager' --sni -I status.cloud.google.com -H status.cloud.google.com
HTTP OK: HTTP/1.1 200 OK - 584329 bytes in 4.511 second response time |time=4.511160s;;;0.000000;10.000000 size=584329B;;;0; |
Note |
---|
|
Information on errors with Javascript |
Some important options
- Address (name / IP or Proxy) → If you need a proxy to access the domain
- Virtual host → is necessary if you have multiple domains and one host running
- How to handle redirect → How to handle redirected pages
- Regular Expression to expect in content
→ - → Used to parse particular content from websites.
- HTTP Method → Set to CONNECT if you're using a proxy
Disable SSL/TLS hostname extension support (SNI) →
Image Removed
Image Added
Useful Links
Related articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | KB |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label in ( "check_http" , "http" , "active_check" ) and type = "page" and space = "KB" |
---|
labels | http check_http |
---|
|
...