pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/38654: nagios dosen't run from out of the box

>Number:         38654
>Category:       pkg
>Synopsis:       nagios dosen't run from out of the box
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 14 01:05:03 +0000 2008
>Originator:     Takahiro Kambe
>Release:        NetBSD 4.0_STABLE
System: NetBSD 4.0_STABLE NetBSD 4.0_STABLE (CALM) #43: Tue 
Dec 18 17:39:08 JST 2007
Architecture: i386
Machine: i386
        nagios dosen't run after install net/nagios-base.

        I've tried to nagios daemon to run minimal configuration.

        # pkg_add nagios-base
        # cp /usr/pkg/share/examples/rc.d/nagios /etc/rc.d
        # vi /etc/rc.conf
        (add nagios=YES)
        # sh /etc/rc.d/nagios start

        Then, error was logged in /var/spool/nagios/nagios.log:

[1210725892] Nagios 2.5 starting... (PID=21106)
[1210725892] LOG VERSION: 2.0
[1210725892] Error: Command 'check-host-alive' has already been defined
[1210725892] Error: Could not register command (config file 
'/usr/pkg/etc/nagios/minimal.cfg', starting on line 77)
[1210725892] Bailing out due to one or more errors encountered in the 
configuration files.  Run Nagios from the command line with the -v option to 
verify your config before restarting. (PID=21106)

        After I commented out these lines in /usr/pkg/etc/nagios/nagios.cfg:


        Then nagios still didn't start.

[1210726329] Nagios 2.5 starting... (PID=21203)
[1210726329] LOG VERSION: 2.0
[1210726329] You do not have permission to write to /var/run/nagios.lock
[1210726329] Bailing out due to errors encountered while attempting to 
daemonize... (PID=21203)

        There are two problems:

        1. default configuration files have some conflicts.
        2. something wrong writing pid file.

        1. Change default configuration.
        2. Chagnge lock_file in nagios.cfg to something like


           And reflect it /etc/rc.d/nagios.


Home | Main Index | Thread Index | Old Index