Nagios 'check_http' plugin '--no-body' question

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
espressobeanies
Posts: 7
Joined: Tue Jan 09, 2018 1:33 pm

Nagios 'check_http' plugin '--no-body' question

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios 'check_http' plugin '--no-body' question

Post by scottwilkerson »

It is it just limited to HTTP headers
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
espressobeanies
Posts: 7
Joined: Tue Jan 09, 2018 1:33 pm

Re: Nagios 'check_http' plugin '--no-body' question

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios 'check_http' plugin '--no-body' question

Post 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.)
Locked