Plug-In check_apache_status, traffic

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Plug-In check_apache_status, traffic

Post by A.Cormack »

Hi All,

Recently after help from you guys I installed a series of plug-ins on to my Nagios system. One of these plug-ins was "check_apache_status". I used two features of this plug-in "apache requests and "traffic", they both worked great and were fully functional.

However, after booting my devices up today the "traffic" feature of this plug-in appears to have stopped working yet, the "Apache Requests" continues to work.

Code: Select all

APACHE UNKNOWN: traffic is
I'm wondering if anyone can tell me why this may be?

Thank You

Code: Select all

Nagios Version: 2912R1.6
Plug-in: check_apache_status
Command: $USER1$/check_apache_status -H $HOSTADDRESS$ -v traffic $ARG1$
$ARG1$: -w 5.0 -c 8.0
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Plug-In check_apache_status, traffic

Post by abrist »

What happens when you run the check from the cli?

Code: Select all

./check_apache_status -H <host ip> -v traffic -w 5.0 -c 8.0
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.
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Re: Plug-In check_apache_status, traffic

Post by A.Cormack »

abrist wrote:What happens when you run the check from the cli?

Code: Select all

./check_apache_status -H <host ip> -v traffic -w 5.0 -c 8.0

Code: Select all

[root@localhost libexec]# ./check_apache_status -H 192.168.19.136 -v traffic -w 5.0 -c 8.0
APACHE UNKNOWN: traffic is
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Plug-In check_apache_status, traffic

Post by abrist »

How about running it without the "-v ...."

Code: Select all

./check_apache_status -H <host ip>
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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Plug-In check_apache_status, traffic

Post by sreinhardt »

If you go to the server status page on the apache server, does it provide traffic information? It could be that the server is not providing said information since the output from the script is fairly direct and is not erroring.

http://192.168.19.136/server-status

Current Time: Wednesday, 06-Mar-2013 13:44:10 CST
Restart Time: Sunday, 03-Mar-2013 03:31:04 CST
Parent Server Generation: 1
Server uptime: 3 days 10 hours 13 minutes 5 seconds
Total accesses: 65919 - Total Traffic: 87.8 MB
CPU Usage: u1999.68 s146.16 cu1.59 cs0 - .726% CPU load
.223 requests/sec - 310 B/second - 1395 B/request
1 requests currently being processed, 11 idle workers
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Re: Plug-In check_apache_status, traffic

Post by A.Cormack »

abrist wrote:How about running it without the "-v ...."

Code: Select all

./check_apache_status -H <host ip>

Code: Select all

APACHE UNKNOWN (1c/1w/3o)
I'm really confused as it was working fine the other day :/
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Plug-In check_apache_status, traffic

Post by abrist »

Do a running tail on your remote host's apache log and then try to run the plugin once again. Post the tail here:

Code: Select all

tail -f /var/log/httpd/error_log
(depending the remote host's distro, the location of your apache logs may be different)
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.
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Re: Plug-In check_apache_status, traffic

Post by A.Cormack »

abrist wrote:Do a running tail on your remote host's apache log and then try to run the plugin once again. Post the tail here:

Code: Select all

tail -f /var/log/httpd/error_log
(depending the remote host's distro, the location of your apache logs may be different)
Im running Apache on a windows server. So i think im right in saying I need to find the windows format of that command?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Plug-In check_apache_status, traffic

Post by abrist »

You should find the error logs for apache on the windows box in the base apache install directory. You will see a folder named "logs". Check there.
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.
A.Cormack
Posts: 103
Joined: Fri Nov 23, 2012 6:32 pm

Re: Plug-In check_apache_status, traffic

Post by A.Cormack »

abrist wrote:You should find the error logs for apache on the windows box in the base apache install directory. You will see a folder named "logs". Check there.
Sorry, yes I've already done that. For some reason I thought what you were asking was more complicated.

The error log's dont point out anything wrong. Just the server shutting down and starting up again.

I had a quick look at the access.logs and it does look like the Nagios server is attempting to get data

Code: Select all

192.168.19.134 - - [06/Mar/2013:20:15:09] "GET /server-status HTTP/1.1" 200 4251
192.168.19.134 is the nagios server
Locked