Nagios 3.2.0 apache critical status
Posted: Tue Feb 17, 2015 4:32 am
hi,
At the moment im working with Nagios 3.2.0 and i have check_apache plugin running on several servers. But there is something weird going on, nagios is telling me that the apache is running but it is in critical state. I get this problem on the servers that are working on Ubuntu 12.04/14.04, the only server that has not got this problem are the servers that are running on Ubuntu 10.4. Personally, I think it's a bug in nagios, because on both the server running 12.04/14.04 & 10.4 are running the same plugin. Is this a common problem that an older Nagios version display Critical errors while it's running?
Does anyone knows what is going on?
Here is the code I use for the plugin:
At the moment im working with Nagios 3.2.0 and i have check_apache plugin running on several servers. But there is something weird going on, nagios is telling me that the apache is running but it is in critical state. I get this problem on the servers that are working on Ubuntu 12.04/14.04, the only server that has not got this problem are the servers that are running on Ubuntu 10.4. Personally, I think it's a bug in nagios, because on both the server running 12.04/14.04 & 10.4 are running the same plugin. Is this a common problem that an older Nagios version display Critical errors while it's running?
Does anyone knows what is going on?
Here is the code I use for the plugin:
Code: Select all
#!/bin/bash
#Check if apache2 is running
running="Apache is running"
apache=$(service apache2 status)
if [ "${apache::17}" == "$running" ];then
echo "$apache"
exit 0
else
echo "$apache"
exit 2
fi