NSCA and Nagios

keene at nrlssc.navy.mil keene at nrlssc.navy.mil
Fri Mar 18 15:00:44 CET 2005


I'm having a few problems with passive service monitoring with Nagios 2.0.

First, NSCA and Nagios don't seem to work together.  NSCA won't create the
"command_file" if it doesn't exist and according to the Nagios documentation,
Nagios will delete it every time it processes it (and I have seen it deleted
before).  This makes NSCA pretty much useless, since it writes all its logs to
a "dump" file which nothing uses.

Relevant notes related to this:

>From the NSCA 2.4 source:

        /* command file doesn't exist - monitoring app probably isn't running...
*/
        if(stat(command_file,&statbuf)){
              ...
              return ERROR
              ...
              return OK
        }

>From the Nagios 2.0 documentation:
# EXTERNAL COMMAND FILE
# This is the file that Nagios checks for external command requests.
# It is also where the command CGI will write commands that are submitted
# by users, so it must be writeable by the user that the web server
# is running as (usually 'nobody').  Permissions should be set at the
# directory level instead of on the file, as the file is deleted every
# time its contents are processed.

command_file=/data/monitor/nagios/var/rw/nagios.cmd





So I modified the NSCA source to create the file if it doesn't exist (and not
care whether or not it existed before, as well).  It is now writing data to the
command file, but nothing seems to reap it.  The file has yet to be deleted and
my passive service (which has updates in the command file) has not been
processed by Nagios.


Any ideas on what is wrong ?


-------------------------------------------------------
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_id=6595&alloc_id=14396&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