problems with nagios.cmd and apache 2.0.5 & above

Subhendu Ghosh sghosh at sghosh.org
Thu Sep 1 19:59:20 CEST 2005


On Thu, 1 Sep 2005, Drew Cullis wrote:

> I ran /usr/sbin/sestatus -v and received this bit of info from the output 
> (there was more but I included only these lines). Would disabling SELinux 
> solve the problem?
>
> SELinux status:         enabled
> SELinuxfs mount:        /selinux
> Current mode:           enforcing
> Mode from config file:  enforcing
> Policy version:         18
> Policy from config file:targeted

as root - run:
audit2allow -l -i /var/log/messages -v

if there are references to nagios.cmd - you have a SELinux perms problem.

Either disable it, or allow permissive, or add http context to 
nagios/var/*

-sg

>
> Subhendu Ghosh wrote:
>
>> On Thu, 1 Sep 2005, Drew Cullis wrote:
>> 
>>> Greetings all;
>>> I am in the process of upgrading our development server along with Nagios 
>>> and am running into  a problem getting nagios to work with Apache.  I am 
>>> running Red Hat Enterprise Server
>>> which has Apache 2.0.52 by default. I found this post from last year but 
>>> it doesn't look like there was resolution to his problem, which is the 
>>> same as mine.
>>> 
>>> https://sourceforge.net/mailarchive/message.php?msg_id=10405076
>>> 
>>> For your dining and dancing pleasure, here is the error that is generated 
>>> when you try to run an external command.
>>> 
>>> Error: Could not stat() command file 
>>> '/usr/local/nagios/var/rw/nagios.cmd'!
>>> The external command file may be missing, Nagios may not be running, 
>>> and/or Nagios may not be checking external commands.
>>> An error occurred while attempting to commit your command for processing
>>> 
>>> Nagios does work like a charm on my workstation running Apache 2.0.46, no 
>>> issues whatsoever straight out of the box. It looks like the issue is with 
>>> Apache 2.0.5 and above.
>>> Has anyone run into this problem also and found a solution? Here are the 
>>> pertinent details.
>>> 
>>> RH ES4
>>> Apache 2.0.52
>>> Nagios 2.0b4
>>> Nagios  Plugins 1.4
>>> 
>>> Thanks for the help...
>>> 
>>> -Drew
>> 
>> 
>> Assuming Nagios is running and it created the named pipe...
>> 
>> Other than Apache - do you have SELinux enabled?  the external command 
>> would be running as apache user and have to write to the pipe you may have 
>> to apply http context to the file...
>> 
>

-- 



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list