check_apache not working and returning HTTP

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
pradeepmk1
Posts: 2
Joined: Thu Apr 17, 2014 3:10 am

check_apache not working and returning HTTP

Post by pradeepmk1 »

I am trying to use check_apache for monitoring the apache specifics. I am testing it on 2 different servers and both have mod_status loaded and Extended On para is added.
Reference I used - https://github.com/danndalf/check_apache
On the Nagios server where we use the script to poll the apache servers is having the Perl modules including SSleay. Port 443 is enabled as well.
Any help that can be provided would be highly appreciated, or please refer any other plugins which I can make use of.

On one server its returning error, HTTP code 400 and another one its returning but with blank values for all monitoring parameters (active_threads, cpu_usage_user etc). Could you please help or give any info regarding this. Any help on this would be highly appreciated.

I have few queries as well..Is there anything that needs to be done at the apache side. I am not a apache expert and hence this question.

The apache server runs on a prod IP which is NAT ed at firewall and we have access to only the NAT'd IP and if the Apache is configured to listen 80 and if we use


check_apache -H 10.10.10.150 -m cpu_usage_user -w 10 -c 15 -P 443 -v -t 10
APACHE UNKNOWN - Host returned HTTP code 400.

check_apache -H 10.10.10.120 -m cpu_usage_user -w 10 -c 15 -P 443 -v -t 10
APACHE OK - cpu_usage_user % | cpu_usage_user=%;10;15
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_apache not working and returning HTTP

Post by abrist »

This plugin checks using mod_status (status_module). Is it enabled on the remote host?

Code: Select all

httpd -M | grep status
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
pradeepmk1
Posts: 2
Joined: Thu Apr 17, 2014 3:10 am

Re: check_apache not working and returning HTTP

Post by pradeepmk1 »

Please find the o/p's

httpd -M | grep -i status
status_module (shared)

httpd -v
Server version: Apache/2.2.26 (Unix)
Server built: Feb 27 2014 00:22:22
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_apache not working and returning HTTP

Post by abrist »

Error code 400 is usually due to an unfinished/malformed request. I doubt the plugin is too blame as it is working against .120, but not .150
Are both of the these apache servers (.120 and .150) the same version?
Are their httpd/vhost configs similar?
Can you curl .150?

Code: Select all

curl https://10.10.10.150
curl -k https://10.10.10.150
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked