[Nagiosplug-help] HELP please! newbie to nagios
Andreas Ericsson
ae at op5.se
Wed Apr 27 17:57:04 CEST 2005
HP Geeza wrote:
>
> Ermmm when i do: (apache is the user my webserver is running as)
> #su - apache /usr/local/nagios/sbin/status.cgi
> I get:
> This account is currently not available
>
Are you running Fedora Core or some RHEL with SELinux? If so, turn it off.
Otherwise,
grep ^apache: /etc/passwd
check what the shell is and make sure it's not /bin/false or some such.
> I dont understand how this is possible since i can log into the web
> interface? - Thus this proves that apache is running becuase it is
> servering the web pages for nagios.
>
Yes. Programs have nicer ways of dropping privileges than invoking an
external program.
> FYI i have a group called nagcmd (suggested by the docs) which apache is
> a memeber.
> After doing: #ls -l /usr/local/nagios/
>
> I get:
> drwxrwxr-x 2 nagios nagcmd 4096 Apr 25 14:57 bin
> drwxr-xr-x 4 nagios nagcmd 4096 Apr 27 16:05 etc
> drwxr-xr-x 2 nagios nagcmd 4096 Apr 26 16:35 libexec
> drwxrwxr-x 2 nagios nagcmd 4096 Apr 27 13:33 sbin
> drwxrwxr-x 9 nagios nagcmd 4096 Apr 27 12:35 share
> drwxrwxr-x 3 nagios nagcmd 4096 Apr 27 16:16 var
>
> So i can't see anything wrong on that front!
>
> Any ideas??? sorry to keep on hassling you!
>
ls -la /usr/local/nagios/{,sbin}
If that turns out to be a dead end, try this clumsier but more revealing
version instead.
path=""
for i in usr local nagios sbin; do
path="$path/$i"
ls -ld $path
done
> P.S
>
> I also noticed this when i try to access a cgi page from the web interface:
> Whoops!
> Error: Could not open CGI config file '/usr/local/nagios/etc/cgi.cfg'
> for reading!
>
> Here are some things you should check in order to resolve this error:
> Make sure you've installed a CGI config file in its proper location. See
> the error message about for details on where the CGI is expecting to
> find the configuration file. A sample CGI configuration file (named
> cgi.cfg) can be found in the sample-config/ subdirectory of the Nagios
> source code distribution.
> Make sure the user your web server is running as has permission to read
> the CGI config file.
>
>
>
> Sooo this obviously suggests that there is a permissions problem with
> apache trying to read the cgi files....am i correct?
>
Yes, that is also what I said a few minutes ago in the last email I sent
you.
>
>> From: Andreas Ericsson <ae at op5.se>
>> To: Nagios Users List <Nagios-users at lists.sourceforge.net>
>> Subject: [Nagios-users] Re: [Nagiosplug-help] HELP please! newbie to
>> nagios
>> Date: Wed, 27 Apr 2005 17:13:20 +0200
>>
>> HP Geeza wrote:
>>
>>> ok fair enuff i will....but at the moment i am really at a dead end.
>>>
>>> After looking in the apache logs I see:
>>> (13)Permission denied: exec of '/usr/local/nagios/sbin/status.cgi'
>>> failed, referer: http://<ip address>/nagios/side.html
>>> [Wed Apr 27 13:33:18 2005] [error] [client <ip address>] Premature
>>> end of script headers: status.cgi, referer: http://<ip
>>> address>/nagios/side.html
>>>
>>
>> su - <webuser>
>> /usr/local/nagios/sbin/status.cgi
>>
>> when that fails, read the man-page for chmod, exit the sub-shell and,
>> as root, fix permissions until you can run the command manually while
>> acting as the user the webserver is running as.
>>
>>> I appreciate your help! - yes i agree i would much rather someone
>>> help me so that i can fix the problem my self. At the moment
>>> becuase im a
>>> newbie im not to sure of whats going on.
>>>
>>
>> Which is why I'm pointing you to the next step of the problem solving
>> process instead of just sending you a five-line script to do the work
>> for you.
>>
>> Metaphorically speaking, I'm teaching you how to use bow and arrow
>> instead of cooking the deer for you.
>>
>>>> From: Andreas Ericsson <ae at op5.se>
>>>> To: nagiosplug-help at lists.sourceforge.net
>>>> Subject: Re: [Nagiosplug-help] HELP please! newbie to nagios
>>>> Date: Wed, 27 Apr 2005 13:50:10 +0200
>>>>
>>>> http://www.catb.org/~esr/faqs/smart-questions.html
>>>>
>>>> You need to read the sections covering the subject line, proper
>>>> forum and just about everything else. Twice, preferrably.
>>>>
>>>> More comments below.
>>>>
>>>> HP Geeza wrote:
>>>>
>>>>> Hi!
>>>>>
>>>>> PLEASE can somebody help! - I have just installed nagios (in an
>>>>> atempt to upgrade from netsaint..which at the moment we have
>>>>> running). However i am facing extreme confusion and difficulties!
>>>>>
>>>>> I think i have managed to install everything ok...i can get to the
>>>>> web interface BUT i can't do anything from there because other then
>>>>> the default (first page) when you log into the web interface i
>>>>> can't see anything else. For example i get the following error
>>>>> when i try to go to one of the pages:
>>>>>
>>>>> Internal Server Error
>>>>> The server encountered an internal error or misconfiguration and
>>>>> was unable to complete your request.
>>>>> Please contact the server administrator, root at localhost and inform
>>>>> them of the time the error occurred, and anything you might have
>>>>> done that may have caused the error.
>>>>> More information about this error may be available in the server
>>>>> error log.
>>>>>
>>>>> Obviously this is an internal error but i can't debug the problem!
>>>>> And i am not sure where to begin.
>>>>>
>>>>
>>>> Did you READ the error log that it tells you to do?
>>>>
>>>>> ALSO i have my old netsaint config (.cfg) files which i would like
>>>>> to import into nagios BUT again i am not to sure how to do this!!!!
>>>>> At the moment i am trying to just use the default minimal.cfg and
>>>>> other .cfg files which were created when i installed nagios BUT
>>>>> these dont seem to be working either
>>>>>
>>>>> PLEASE help!
>>>>
>>>>
>>>>
>>>> Nopes. I can possibly help you help yourself, but I won't fix your
>>>> problems for you.
>>>>
>>>>> Sanj
>>>>>
>>>>> _________________________________________________________________
>>>>> Be the first to hear what's new at MSN - sign up to our free
>>>>> newsletters! http://www.msn.co.uk/newsletters
>>>>>
>>>>>
>>>>>
>>>>> -------------------------------------------------------
>>>>> SF.Net email is sponsored by: Tell us your software development plans!
>>>>> Take this survey and enter to win a one-year sub to SourceForge.net
>>>>> Plus IDC's 2005 look-ahead and a copy of this survey
>>>>> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
>>>>> _______________________________________________
>>>>> Nagiosplug-help mailing list
>>>>> Nagiosplug-help at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>>>>> ::: Please include plugins version (-v) and OS when reporting any
>>>>> issue. ::: Messages without supporting info will risk being sent to
>>>>> /dev/null
>>>>>
>>>>
>>>> --
>>>> Andreas Ericsson andreas.ericsson at op5.se
>>>> OP5 AB www.op5.se
>>>> Lead Developer
>>>>
>>>>
>>>> -------------------------------------------------------
>>>> SF.Net email is sponsored by: Tell us your software development plans!
>>>> Take this survey and enter to win a one-year sub to SourceForge.net
>>>> Plus IDC's 2005 look-ahead and a copy of this survey
>>>> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
>>>> _______________________________________________
>>>> Nagiosplug-help mailing list
>>>> Nagiosplug-help at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
>>>> ::: Please include plugins version (-v) and OS when reporting any
>>>> issue. ::: Messages without supporting info will risk being sent to
>>>> /dev/null
>>>
>>>
>>>
>>> _________________________________________________________________
>>> Be the first to hear what's new at MSN - sign up to our free
>>> newsletters! http://www.msn.co.uk/newsletters
>>>
>>>
>>
>> --
>> Andreas Ericsson andreas.ericsson at op5.se
>> OP5 AB www.op5.se
>> Lead Developer
>>
>>
>> -------------------------------------------------------
>> SF.Net email is sponsored by: Tell us your software development plans!
>> Take this survey and enter to win a one-year sub to SourceForge.net
>> Plus IDC's 2005 look-ahead and a copy of this survey
>> Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
>> _______________________________________________
>> 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
>
>
> _________________________________________________________________
> Winks & nudges are here - download MSN Messenger 7.0 today!
> http://messenger.msn.co.uk
>
>
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
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