On 08.12.2009 17:53, Rus Hughes wrote: > Hi, > > We're using thin stored configs heavily to manage things like Munin > and Nagios and we're currently wondering what to do when nodes go > away, or change considerably. > > If we get rid of a server then all it's stored config is still present > in the database, as well as it's nagios and munin configurations. > > We created a script that iterates through the database deleting > associated lines from > hosts/fact_values/resources/resource_tags/param_values tables cleaning > out information for old hosts, but then doing a puppet run on say our > Munin or Nagios doesn't seem to fix things, Puppet doesn't seem to > notice that the extra Nagios or virtual configurations we're using for > Munin have vanished, so isn't rebuilding the Nagios/Munin files. > > Does anyone have any idea how we can solve this problem? We're using > Puppet 0.25.1.
There is a puppetstoredconfigclean.rb in the ext/ directory of the puppet distribution. You can use that to cleanly remove nodes from stored configs. On the matter of managing munin and nagios, you need to use a mechanism like concatenated_file[1], which purges unmanaged parts. After deleting a node from the stored configs db, the resources formerly collected become unmanaged and will be removed by purging. Regards, DavidS [1]http://github.com/puppet-modules/puppet-common/blob/0caa32db1aaad6dabc9542c5e0aa20e76ea94f48/manifests/defines/concatenated_file.pp -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.