example42 / puppet-nagios

Puppet module for Nagios
Other
4 stars 18 forks source link

Error puppet run #24

Closed rkathpal closed 11 years ago

rkathpal commented 11 years ago

Hi,

I was trying to install nagios on centos 5.5 using the example42 module, the puppet run happens without any errors except for starting nagios on the client m/c.

when I run nagios verify on the client m/c, I get the error below Reading configuration data... Error: Cannot open resource file '/etc/nagios/private/resource.cfg' for reading! Read main config file okay... Processing object config directory '/etc/nagios/auto.d/settings'... Processing object config file '/etc/nagios/auto.d/settings/contactgroup_admins.cfg'... Processing object config file '/etc/nagios/auto.d/settings/contact_nagiosadmin.cfg'... Processing object config file '/etc/nagios/auto.d/settings/timeperiods.cfg'... Processing object config file '/etc/nagios/auto.d/settings/templates.cfg'... Processing object config directory '/etc/nagios/auto.d/hostgroups'... Processing object config file '/etc/nagios/auto.d/hostgroups/all.cfg'... Processing object config directory '/etc/nagios/auto.d/hosts'... Processing object config directory '/etc/nagios/auto.d/services'... Processing object config directory '/etc/nagios/auto.d/commands'... Processing object config file '/etc/nagios/auto.d/commands/special.cfg'... Processing object config file '/etc/nagios/auto.d/commands/extra.cfg'... Processing object config file '/etc/nagios/auto.d/commands/general.cfg'... Processing object config directory '/etc/nagios/auto.d/extra'... Processing object config directory '/etc/nagios/modules'... 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!

Please let me know if I am doing anything wrong, also I am not using storeconfigs on my puppet setup. Please suggest.

alvagante commented 11 years ago

You need at least one node to be monitored added to the Nagios server, so that the 'all' hostgroup can contain something. The nagios service should start correctly once are collected the first monitored nodes via exported resources.

rkathpal commented 11 years ago

The thing I am using puppet in an multitenant setup and am not using storeconfig / exported resources as yet, is there an alternative to this, something making a change to the source/template file or something else as a workaround... sorry to bug you on this..

alvagante commented 11 years ago

The above commit should make Nagios start also when no nodes are collected.

rkathpal commented 11 years ago

Thanks a ton.. works like a charm..