Deactivating and purging nodes

PuppetDB keeps records on every node that checks into your Puppet Enterprise installation. In an environment where nodes often come and go, such as an immutable infrastructure, lots of data can pile up about nodes that impact the performance of the database and infrastructure. By default, Puppet will expire nodes that have not checked in for seven days, and will cease exporting objects from the catalog. This setting can be managed with the node-ttl setting underneath the [database] section of puppet.conf. An additional setting, node-purge-ttl, lets the database know when to drop records for a node. By default, 14 days is the purge time for Puppet Enterprise. We can also perform these tasks manually with puppet node deactivate and puppet node purge

We can manage the default settings using puppetlabs/inifile as shown below:

# This profile will clean out nodes much more aggressively, deactivating nodes not seen for 2 days, and purging nodes not seen for 4.

class profile::puppetdb {

ini_setting
{ 'Node TTL':
ensure
=> present, path => '/etc/puppetlabs/puppet/puppet.conf', section => 'database', setting => 'node-ttl', value => '2d', }

ini_setting { 'Node Purge TTL': ensure => present, path => '/etc/puppetlabs/puppet/puppet.conf', section => 'database', setting => 'node-purge-ttl', value => '4d', }

}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.199.191