Its probably the nagios resource, its well known for not scaling when the files contain a lot of entries. That would explain why your PuppetDB is showing low load - as its probably not the bottleneck.
The most performant work-around I've seen for this is that you can use the nagios_* resources to export, but then use custom collectors that query PuppetDB (using Dalen's puppetdbquery for example: https://github.com/dalen/puppet-puppetdbquery) that generates custom templates for your nagios_*.cfg files. If nagios_service.cfg is the main bottleneck, you can focus on this one to start with. This way you continue to use the model of the nagios_* resources, but at collection time you improve performance. ken. On Fri, May 24, 2013 at 1:53 PM, Jonathan Gazeley <jonathan.gaze...@bristol.ac.uk> wrote: > Hi all, > > For months now I've been using Puppet with PuppetDB backend to manage my > Nagios configs. We now have 1200+ services being checked and including > servicedependency, host, hostdependency, command and other Nagios resources > being managed, that's about 3000 resources in total. Unfortunately this > means the monitoring server takes about 8 minutes to perform a Puppet run. > > I'm not exactly sure what the bottleneck is - whether it's doing 3000 calls > to PuppetDB (although the load on the PuppetDB server and its Postgres > database are low), or whether it is parsing nagios_service.cfg that causes > the slowdown. It's about 500kb and 11,000 lines. > > I know it is possible to squirt the Nagios config into several smaller files > when the resources are collected on the monitoring server, but I gather this > also means that Nagios resources cannot be purged if the default file > locations are not used. The ability to purge old configs automatically is > essential to our environment. > > So does anyone have any suggestions on how to improve the performance of > Puppet when handling large Nagios configs? > > Cheers, > Jonathan > > -- > 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+unsubscr...@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?hl=en. > 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+unsubscr...@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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.