Page 1 of 1
Nagios 'check_http' plugin '--no-body' question
Posted: Mon Jan 07, 2019 4:18 pm
by espressobeanies
Just had a question about the Nagios 'check_http --no-body' option: Is it just limited to HTTP headers or does this include HTML tags like the <title> of a webpage?
Re: Nagios 'check_http' plugin '--no-body' question
Posted: Mon Jan 07, 2019 4:25 pm
by scottwilkerson
It is it just limited to HTTP headers
Re: Nagios 'check_http' plugin '--no-body' question
Posted: Tue Jan 08, 2019 12:36 pm
by espressobeanies
Scott, thanks for the reply. The reason I'm asking this is that I have Nagios checking the uptime status of a 404 error page and with the existence of the '--no-body' option, I'm still seeing the HTTP/1.1 response display a "404 Not Found" message even though it should just be checking the HTTP headers only.
Re: Nagios 'check_http' plugin '--no-body' question
Posted: Tue Jan 08, 2019 5:10 pm
by ssax
Please try using the
-j HEAD option instead of
--no-body:
Code: Select all
-j, --method=STRING (for example: HEAD, OPTIONS, TRACE, PUT, DELETE, CONNECT)
Set HTTP method.
-N, --no-body
Don't wait for document body: stop reading after headers.
(Note that this still does an HTTP GET or POST, not a HEAD.)