Apache plugin to check running or stop

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
juned
Posts: 3
Joined: Fri Mar 21, 2014 1:27 am

Apache plugin to check running or stop

Post by juned »

Dear Friends,

I found Nagios as very useful tool to monitor different services.

I am looking for plugin to check running or stop status of Apache service.

I found some related plugin but they are not giving expected results.
http://exchange.nagios.org/directory/Pl ... /details#/

I have tried this plugin but even with stopped Apache service is shoes status Ok in
Nagios GUI, i am looking for such plugin which should reflect it status to CRITICAL
when service goes down.

Apart from this if i can check specific logs from Nagios for this service then that
would be even better.

so is there any plugin is available for my need ?

Regards,
Juned Khan
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Apache plugin to check running or stop

Post by tmcdonald »

There are a couple of ways to do this, but the easiest is just to write a bash plugin that runs "service apache status" or "service httpd status" depending on your distribution and report based on the output.

What arguments are you using with the plugin you linked?
Former Nagios employee
juned
Posts: 3
Joined: Fri Mar 21, 2014 1:27 am

Re: Apache plugin to check running or stop

Post by juned »

Hi

I have define service like this for apache

define service{
use local-service
host_name 192.168.1.75
service_description Apache Active Threads
check_command check_apache!active_threads!200!300!
}

Regards
Juned Khan
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Apache plugin to check running or stop

Post by slansing »

Can you show us the actual "check_apache" command from your commands.cfg file? It is possible that there is a flag that can be used with that plugin to check the current state of the apache process, as it looks like you are currently only checking active threads. You could also use the check_procs plugin that should come with the nagios plugins package to check if a process is running or not.
Locked