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

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

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

Postby espressobeanies » Mon Jan 07, 2019 4:18 pm

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?
espressobeanies
 
Posts: 7
Joined: Tue Jan 09, 2018 1:33 pm

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

Postby scottwilkerson » Mon Jan 07, 2019 4:25 pm

It is it just limited to HTTP headers
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12916
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

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

Postby espressobeanies » Tue Jan 08, 2019 12:36 pm

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.
espressobeanies
 
Posts: 7
Joined: Tue Jan 09, 2018 1:33 pm

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

Postby ssax » Tue Jan 08, 2019 5:10 pm

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.)
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3581
Joined: Wed Feb 11, 2015 12:54 pm


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 15 guests