Nagios fails to start


#1

Hi

I’ve installed nagios from the app center on a Slave Domain Controller, but it fails to start.

Manually trying to start the service gives the error:

“Starting the following services failed: nagios3”

The nagios3 log shows nothing significant:

[1427687823] Nagios 3.4.1 starting… (PID=9743)
[1427687823] Local time is Mon Mar 30 16:57:03 NZDT 2015
[1427687823] LOG VERSION: 2.0
[1427687823] Finished daemonizing… (New PID=9744)
[1427687853] Caught SIGTERM, shutting down…
[1427687853] Successfully shutdown… (PID=9744)

Where should I be looking next for possible causes?

Thanks


Nagios stopped-Internal Module error
#2

Hi,

the interesting part from the log-snippet is the fact, that the SIGTERM happens 30 seconds after the start. This could lead to the assumption that a check or some internal Nagios process failed.

I would first make sure that all join scripts on the slave have been executed. After that I’d enhance the nagios.cfg with debug_* options. The file /etc/nagios3/nagios.cfg.debian contains some samples.

Best Regards,
Dirk Ahrnke


#3

Still looking through this, but before I got to increasing the logging level, I noticed that following error message while trying to start the service from the command line:

Error: Could not open config directory '/etc/nagios3/conf.univention.d' for reading. Error processing object config files!

The folder permissions are listed below - should the conf.univention.d directory be owned by root or nagios?

Thanks

-rw-r--r-- 1 root root 1518 Mar 30 16:57 apache2.conf -rw-r--r-- 1 root root 1986 Mar 18 2014 apache2.conf.debian -rw-r--r-- 1 root root 10198 Mar 30 16:57 cgi.cfg -rw-r--r-- 1 root root 12479 Mar 22 2014 cgi.cfg.debian -rw-r--r-- 1 root root 2443 Mar 18 2014 commands.cfg drwxr-xr-x 2 root root 4096 Mar 30 16:57 conf.d drwxr-xr-x 2 root root 4096 Oct 30 01:32 conf.local.d drwx------ 9 root nogroup 4096 Mar 30 17:12 conf.univention.d -rw-r--r-- 1 root root 31088 Mar 30 16:57 nagios.cfg -rw-r--r-- 1 root root 44222 Mar 18 2014 nagios.cfg.debian -rw-r----- 1 root nagios 1293 Mar 18 2014 resource.cfg drwxr-xr-x 2 root root 4096 Mar 30 16:57 stylesheets


#4

Hi,

conf.univention.d and its subdirectories should be 755 root:nogroup.
The files in these directories should be 644 root:nogroup.

Best Regards,
Dirk Ahrnke


#5

Thanks @ ahrnke

Changing the folder ownership fixed the initial problem and got the nagios server up and running. Every nagios check resulted in the following error:

SERVICE ALERT: **nagios server.domain.name**;UNIVENTION_SMTP2;CRITICAL;HARD;10;CHECK_NRPE: Error - Could not complete SSL handshake.

My fix was to install on the domain controller, not the backup controller. The only minor problem I’ve encountered since is that the “UNIVENTION_REPLICATION” check doesn’t have read access to the “/var/lib/univention-directory-listener/notifier_id” file. Changing this to 604 permissions solved the issue.


#6

Hello,

please use the Univention Configuration Registry and set the Variable nagios/client/allowedhosts to set the hostname for the host who have access to the localsystem.
For example: To allow access for the host NAGIOS to the host PDC, set the UCR-Variable nagios/client/allowedhosts on the host PDC to NAGIOS.
On the host NAGIOS you need to do the same steps.

Additional you can create a Policy and assign it to the Container with the Computerobject in the LDAP-Tree.

With kind regards

Hendrik Dreyer