example42 / psick

Puppet Systems Infrastructure Construction Kit: The control-repo

Home Page:http://www.example42.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

default nagios module options gives 500 internal server error on login

jskarpe opened this issue · comments

My config:

include nagios

When trying to log in with the expected defaults: 'nagiosadmin' / '', server returns 500:

(2)No such file or directory: Could not open password file: /etc/nagios3/htpasswd.users

Probably related to /etc/init.d/nagios3 start failing due to:

Error: Could not expand members specified in hostgroup (config file '/etc/nagios/auto.d/hostgroups/all.cfg', starting on line 3)
Error processing object config files!

The systems I'm using is a clean Ubuntu 12.04 LTS

Create /etc/nagios3/htpasswd.users manually on the Nagios server (that's a bug I have to fix, but will do it in the nextgen module):
htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin

Error: Could not expand members specified in hostgroup (config file '/etc/nagios/auto.d/hostgroups/all.cfg', starting on line 3)
is probably due to the fact that there's no other host where puppet has runs and for which it has exported configs.
First run puppet on another node, then run it on the Nagios server, you should see /etc/nagios/auto.d/hosts/ being populated. (Be sure to have storeconfigs = true on you puppetmaster puppet.conf)

Error: Could not expand members specified in hostgroup (config file '/etc/nagios/auto.d/hostgroups/all.cfg', starting on line 3)

The common workaround here is to always add localhost as a node. Also worth mentioning that since nagios3, the member directive is no longer a required field (although it does make sense to keep it for the 'all' definition.)

Another issue with default nagios: nagios-nrpe-plugin is not included (installed), such that all nrpe (default) checks are failing.

I'm going to rewrite the Nagios module using the NextGen layout, prefer not to spend to much energy in fixing the old one and its compatibily with the (new) nrpe module.
I suppose you managed anyway to install nagios-nrpe-plugin package.