No output returned from plugin

Marc Powell marc at ena.com
Wed Apr 13 16:47:19 CEST 2005



> -----Original Message-----
> From: Olivier Mugabonake [mailto:mugabonakeolivier at gmail.com]
> Sent: Wednesday, April 13, 2005 9:06 AM
> To: Marc Powell
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] No output returned from plugin
> 
> On 4/12/05, Marc Powell <marc at ena.com> wrote:
> >
> >
> > > -----Original Message-----
> > > From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-
> > > admin at lists.sourceforge.net] On Behalf Of Olivier Mugabonake
> > > Sent: Tuesday, April 12, 2005 3:25 AM


> > What more verbose output does it give you when you follow the 'Click
> > here for more info' link? That would be useful.
> 
>  Here is what I get when I click on the link in question:
> mx1srv4 libexec # /usr/nagios/libexec/check_nagios_db.pl -h
> 

I don't know why this is here. You wouldn't see that from the CGI. Do
you?

> Process Commands
> It appears as though Nagios is not running, so commands are
> temporarily unavailable...
> 
> Process Status Information
> Process Status:
>   CRITICAL
> Check Command Output: 	Error: Cannot open status log for
reading!

Ok, so the nagios_check_command as defined in cgi.cfg is failing. What
is that command?

> 
> In my /etc/nagios/nagios.cfg  the status file is
/var/nagios/status.log
> But This file doesn't exist. when I try to create it manually, it's
> removed when I restart nagios.

If you're using a database backend the status.log isn't used at all. All
status information is stored in the database. It seems you may be using
a database back end. Is that a correct assumption? I dislike guessing.
 
> > The cgi's determine if nagios is running by executing the
> > nagios_check_command as defined in cgi.cfg. There is more
information on
> > that command in the doccos and the file itself. What happens when
you
> > run that command manually? By default it checks for a running
process
> > and that the status file has been recently updated. If either of
those
> > checks fail it assumes that nagios isn't running properly. You may
need
> > to tweak the arguments to the command to match your ps output or, if
> > you're using a DB backend, change the command entirely (to
> > check_nagios_db.pl for example).
> 
> When I run this command, this is the output I get:
> nagios-server libexec # /usr/nagios/libexec/check_nagios_db.pl -h
> Can't open config file '/opt/nagios/etc/cgi.cfg': No such file or
> directory

You must edit check_nagios_db.pl to give it the correct path to your
cgi.cfg. It would appear that your cgi.cfg is not in /opt/nagios/etc
(not that it should be there). It's probably in /usr/local/nagios/etc.

 
> This is the out put of ps:
> 
> nagios-server root # ps faux | grep nagios
> root     14078  0.0  0.0   1432   476 pts/0    S+   16:03   0:00
> \_ grep nagios
> nagios   15735  0.0  0.1   2700  1272 ?        Ss   Apr05   0:00
> /usr/nagios/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon
> nagios    7723  0.0  0.0   1692   612 ?        Ss   Apr08   0:00
> /usr/nagios/bin/nsca -c /etc/nagios/nsca.cfg --daemon
> nagios   15600  0.0  0.3   6088  3400 ?        Ss   Apr12   0:26
> /usr/nagios/bin/nagios -d /etc/nagios/nagios.cfg
> 
> Hope we'll find now what's wrong...

I think if you verify the check_nagios_command in cgi.cfg is pointing to
check_nagios_db.pl and correct the path to cgi.cfg in check_nagios_db.pl
you'll be good to go.

--
Marc


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
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