Nagios 'check_http' plugin '--no-body' question
-
- Posts: 7
- Joined: Tue Jan 09, 2018 1:33 pm
Nagios 'check_http' plugin '--no-body' question
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?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios 'check_http' plugin '--no-body' question
It is it just limited to HTTP headers
-
- Posts: 7
- Joined: Tue Jan 09, 2018 1:33 pm
Re: Nagios 'check_http' plugin '--no-body' question
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
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.)