Page 1 of 1

check_apache not working and returning HTTP

Posted: Thu Apr 17, 2014 5:58 am
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

Re: check_apache not working and returning HTTP

Posted: Thu Apr 17, 2014 12:27 pm
by abrist
This plugin checks using mod_status (status_module). Is it enabled on the remote host?

Code: Select all

httpd -M | grep status

Re: check_apache not working and returning HTTP

Posted: Fri Apr 18, 2014 4:27 am
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

Re: check_apache not working and returning HTTP

Posted: Fri Apr 18, 2014 2:15 pm
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