thias / puppet-nagios

Puppet Nagios module
Other
23 stars 72 forks source link

nagios_hostgroup not populating nagios_hostgroup.cfg using hiera #154

Closed ainiesta82 closed 5 years ago

ainiesta82 commented 5 years ago

Hi,

I am trying to add hostgroups using puppet hiera and nagios_hosgroup resource type (https://puppet.com/docs/puppet/5.3/types/nagios_hostgroup.html), the following way, on my server.yaml file:

nagios::server::nagios_hostgroup: 'resource_title_1': ensure: 'present' alias: 'Some desdcription' nagios::server::nagios_hostgroup: 'resource_title_2': ensure: 'present' alias: 'Some description'

but when I run puppet on the Nagios server, it fails with Error: Could not find any hostgroup matching 'resource_title_1' (config file '/etc/nagios/nagios_host.cfg', starting on line 101)

So I also use hiera on the nagios client and it adds the hostgroup on the nagios_host.cfg without any problem, but for some strange reason naginator doesn't generate it for the hostgroups. Thanks in advance for the help.

My current versions are: Nagios 4.4.3 Puppet Server 5.3

ainiesta82 commented 5 years ago

After reading better the API, realized that it had to be hostgroups and not nagios_hostgroup, therefore this is being closed. Thanks.