On 2013-06-05 15:53, Jonathan Gazeley wrote:
On 25/05/13 17:24, David Schmitt wrote:
On 2013-05-25 10:11, Alexander Bien wrote:
On 24.05.2013 16:58, Ken Barber wrote:
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.

I second that. We have mysql storeconfigs, about 5000 Services, 2,5 MB
nagios_* files and >50k lines of config. The puppet run takes aprox 45
minutes. I have heard people on irc say that its not uncommon.

You can cut quite a bit off that time by using templates and files
(one per service/host) and purging on the base directory.


Hi David,

Sorry to reply to a stale thread. Please could you explain a bit more on
your solution? Presumably I need to pas some extra arguments to my
spaceship operator that collects the Nagios resources, but how is the
directory-level purging done?

I'm doing it this way:

file {
        "/etc/nagios/conf.d":
                ensure => directory,
                source => "puppet:///modules/nagios/empty",
                ignore => [ '.gitkeep' ],
                recurse => true,
                force => true,
                purge => true;
}

File<<| tag == 'nagios::service' |>>

define nagios::service(...) {
        @@file {
                "/etc/nagios/conf.d/${host}_service_${name}":
                        content => template("nagios/service.erb"),
                        tag => 'nagios::service',
                        ...;
}

This way you collect a minimal number of simple resources. This still is dog slow when you have a couple of thousand services, but it sure beats the heck out of parsing the complete nagios config for each nagios_* resource.



Regards, David

--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to