Hello folks, I am currently using Puppet to forge the nagios configuration files. Using exported ressources it really works well - to a point. The one thing I am banging my head against is the service definitions. The services use stuff like remote-nrpe-zombie-procs, which of course, is not defined anywhere: define service { ## --PUPPET_NAME-- (called ''_naginator_name'' in the manifest) check_zombie_procs_gaming use remote-nrpe-zombie-procs host_name gaming.alpha-labs.net } So far I am letting puppet generate the three configs: nagios_host.cfg nagios_hostextinfo.cfg nagios_service.cfg Tho for this to work I would need a corresponding commands.cfg and all the Howtos out there do not seem to have my problem. The important snipplet from my config would be this: Nagios_host <<||>> { require => File[resource-d], notify => Service[icinga], } Nagios_service <<||>> { require => File[resource-d], notify => Service[icinga], } Nagios_hostextinfo <<||>> { require => File[resource-d], notify => Service[icinga], } Nagios_command <<||>> { require => File[resource-d], notify => Service[icinga], } After banging my head for 3 evenings on this I really need your help. Thanks for any pointers. -Chris. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Shameless plug. I wrote a module to do pretty much what you are trying to achieve. http://forge.puppetlabs.com/rendhalver/monitoring It currently works on CentOS and Fedora. Debian/Ubuntu support is in progress. I also have a couple of other modules for managing nrpe and icinga Feel free to have a look at the code on github for inspiration even if you don''t install it. Pete. On 28 June 2013 02:07, Christian Reiß <reiss.symgenius@gmail.com> wrote:> Hello folks, > > I am currently using Puppet to forge the nagios configuration files. Using > exported ressources it really works well - to a point. > > The one thing I am banging my head against is the service definitions. The > services use stuff like remote-nrpe-zombie-procs, which of course, is not > defined anywhere: > > define service { > ## --PUPPET_NAME-- (called ''_naginator_name'' in the manifest) > check_zombie_procs_gaming > use remote-nrpe-zombie-procs > host_name gaming.alpha-labs.net > } > > So far I am letting puppet generate the three configs: > > nagios_host.cfg > nagios_hostextinfo.cfg > nagios_service.cfg > > Tho for this to work I would need a corresponding commands.cfg and all the > Howtos out there do not seem to have my problem. The important snipplet from > my config would be this: > > > Nagios_host <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_service <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_hostextinfo <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_command <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > > After banging my head for 3 evenings on this I really need your help. > Thanks for any pointers. > > -Chris. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
In my experience, exporting nagios_command resources doesn''t work so well. What I''ve found works best, is to define nagios_command{}''s directly on the server, rather than exporting and collecting them there later. In my setup, the only resource that export is the nagios_host. I define commands and services on the server, and assign the services to hostgroups. Hosts then get service checks assigned to them based on which hostgroups I put them in (usually done via the hosts role definition). I find that this works well, since it doesn''t leave me with multiple exported nagios_service resources for every single host, that will eventually need to get cleaned out of PuppetDB when the host is no longer in service. -Steve On Thu, Jun 27, 2013 at 12:07 PM, Christian Reiß <reiss.symgenius@gmail.com>wrote:> Hello folks, > > I am currently using Puppet to forge the nagios configuration files. Using > exported ressources it really works well - to a point. > > The one thing I am banging my head against is the service definitions. The > services use stuff like remote-nrpe-zombie-procs, which of course, is not > defined anywhere: > > define service { > ## --PUPPET_NAME-- (called ''_naginator_name'' in the > manifest) check_zombie_procs_gaming > use remote-nrpe-zombie-procs > host_name gaming.alpha-labs.net > } > > So far I am letting puppet generate the three configs: > > nagios_host.cfg > nagios_hostextinfo.cfg > nagios_service.cfg > > Tho for this to work I would need a corresponding commands.cfg and all the > Howtos out there do not seem to have my problem. The important snipplet > from my config would be this: > > > Nagios_host <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_service <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_hostextinfo <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_command <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > > After banging my head for 3 evenings on this I really need your help. > Thanks for any pointers. > > -Chris. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On 06/28/2013 04:57 PM, Stephen Jahl wrote:> In my experience, exporting nagios_command resources doesn''t work so > well. What I''ve found works best, is to define nagios_command{}''s > directly on the server, rather than exporting and collecting them there > later. > > In my setup, the only resource that export is the nagios_host. I define > commands and services on the server, and assign the services to > hostgroups. Hosts then get service checks assigned to them based on > which hostgroups I put them in (usually done via the hosts role > definition). I find that this works well, since it doesn''t leave me with > multiple exported nagios_service resources for every single host, that > will eventually need to get cleaned out of PuppetDB when the host is no > longer in service.Yeah, that approach seems better performance-wise. Tank you for sharing :) -- Jakov Sosic www.srce.unizg.hr -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
El jueves, 27 de junio de 2013 18:07:03 UTC+2, Christian Reiß escribió:> > Hello folks, > > I am currently using Puppet to forge the nagios configuration files. Using > exported ressources it really works well - to a point. > > The one thing I am banging my head against is the service definitions. The > services use stuff like remote-nrpe-zombie-procs, which of course, is not > defined anywhere: > > define service { > ## --PUPPET_NAME-- (called ''_naginator_name'' in the > manifest) check_zombie_procs_gaming > use remote-nrpe-zombie-procs > host_name gaming.alpha-labs.net > } > > So far I am letting puppet generate the three configs: > > nagios_host.cfg > nagios_hostextinfo.cfg > nagios_service.cfg > > Tho for this to work I would need a corresponding commands.cfg and all the > Howtos out there do not seem to have my problem. The important snipplet > from my config would be this: > > > Nagios_host <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_service <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_hostextinfo <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > Nagios_command <<||>> { > require => File[resource-d], > notify => Service[icinga], > } > > > After banging my head for 3 evenings on this I really need your help. > Thanks for any pointers. > > -Chris. > > Hello Chris,I am facing here the same problem. Did you manage to fix/workaround it? Thank you Best regards -------------------------------------------------------------------------------------- Juan Sierra Pons juan@elsotanillo.net Linux User Registered: #257202 http://www.elsotanillo.net GPG key = 0xA110F4FE Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE -------------------------------------------------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Hi steve, So, you have all the "services" defined statically on the Nagios server? That setup only works, I think, if you install your Nagios server at the very end of your deployment process and all the clients are up and ready before the server. If you do a parallel deployment, then there is a very good chance that Nagios will refuse to start at the first run. Cheers!! On Friday, June 28, 2013 3:57:09 PM UTC+1, Steve J wrote:> > In my experience, exporting nagios_command resources doesn''t work so well. > What I''ve found works best, is to define nagios_command{}''s directly on the > server, rather than exporting and collecting them there later. > > In my setup, the only resource that export is the nagios_host. I define > commands and services on the server, and assign the services to hostgroups. > Hosts then get service checks assigned to them based on which hostgroups I > put them in (usually done via the hosts role definition). I find that this > works well, since it doesn''t leave me with multiple exported nagios_service > resources for every single host, that will eventually need to get cleaned > out of PuppetDB when the host is no longer in service. > > -Steve > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
On 17/10/13 07:44 AM, Juan Sierra Pons wrote:> El jueves, 27 de junio de 2013 18:07:03 UTC+2, Christian Reiß escribió: > The one thing I am banging my head against is the service > definitions. The services use stuff like remote-nrpe-zombie-procs, > which of course, is not defined anywhere: > > define service { > ## --PUPPET_NAME-- (called ''_naginator_name'' in the > manifest) check_zombie_procs_gaming > use remote-nrpe-zombie-procs > host_name gaming.alpha-labs.net > <http://gaming.alpha-labs.net> > } > > So far I am letting puppet generate the three configs: > > nagios_host.cfg > nagios_hostextinfo.cfg > nagios_service.cfg > > Tho for this to work I would need a corresponding commands.cfg and > all the Howtos out there do not seem to have my problem.> Hello Chris, > > I am facing here the same problem. Did you manage to fix/workaround it?This might be of interest to you two: https://projects.puppetlabs.com/issues/1180 the way I currently work around the inability to export host/service templates is by defining a file resource in which I write the templates. -- Gabriel Filion
Hello, Right now I am using a workaround similar to Steve''s approach and it works pretty well Just checking what other people is doing Thank for your replies and time Best regards -------------------------------------------------------------------------------------- Juan Sierra Pons juan@elsotanillo.net Linux User Registered: #257202 http://www.elsotanillo.net GPG key = 0xA110F4FE Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE -------------------------------------------------------------------------------------- 2013/10/17 Gabriel Filion <lelutin@gmail.com>:> On 17/10/13 07:44 AM, Juan Sierra Pons wrote: >> El jueves, 27 de junio de 2013 18:07:03 UTC+2, Christian Reiß escribió: >> The one thing I am banging my head against is the service >> definitions. The services use stuff like remote-nrpe-zombie-procs, >> which of course, is not defined anywhere: >> >> define service { >> ## --PUPPET_NAME-- (called ''_naginator_name'' in the >> manifest) check_zombie_procs_gaming >> use remote-nrpe-zombie-procs >> host_name gaming.alpha-labs.net >> <http://gaming.alpha-labs.net> >> } >> >> So far I am letting puppet generate the three configs: >> >> nagios_host.cfg >> nagios_hostextinfo.cfg >> nagios_service.cfg >> >> Tho for this to work I would need a corresponding commands.cfg and >> all the Howtos out there do not seem to have my problem. > >> Hello Chris, >> >> I am facing here the same problem. Did you manage to fix/workaround it? > > This might be of interest to you two: > > https://projects.puppetlabs.com/issues/1180 > > the way I currently work around the inability to export host/service > templates is by defining a file resource in which I write the templates. > > -- > Gabriel Filion >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.