Configuring PuppetDB
Sections
After you've installed Puppet Enterprise, optimize it for your environment by configuring PuppetDB as needed.
This page covers a few key topics, but additional settings and information about configuring PuppetDB is available in the PuppetDB configuration documentation. Be sure to check that the PuppetDB docs version you're looking at matches the one version of PuppetDB in your PE.
Configure agent run reports
By default, every time Puppet runs, the primary server generates agent run reports and submits them to PuppetDB. You can enable or disable this as needed.
To enable or disable agent run reports using the console:
- Click Node groups, and in the PE Infrastructure group, select the PE Master group.
-
On the Classes tab, add the
puppet_enterprise::profile::master::puppetdb
class, select thereport_processor_ensure
parameter, and enter the valuepresent
to enable agent run reports orabsent
to disable agent run reports. - Click Add parameter and commit changes.
- On the nodes hosting the primary server and console, run Puppet.
Configure how long before PE stops managing deactivated nodes
Use the node-purge-ttl
parameter to set the "length of time" value
before PE automatically removes nodes that have been
deactivated or expired. This also removes all facts, catalogs, and reports for the relevant
nodes.
To change the amount of time before nodes are purged using the console:
Change the PuppetDB user password
The console uses a database user account to access its PostgreSQL database. Change it if it is compromised or to comply with security guidelines.
To change the password:
-
Stop the
pe-puppetdb
puppet
service by runningpuppet resource service pe-puppetdb ensure=stopped
-
On the database server (which might or might not
be the same as PuppetDB, depending on your
deployment's architecture), use the PostgreSQL
administration tool of your choice to change the user's password. With the
standard PostgreSQL client, you can do this by
running
ALTER USER console PASSWORD '<new password>';
-
Edit
/etc/puppetlabs/puppetdb/conf.d/database.ini
on the PuppetDB server and change thepassword:
line undercommon
orproduction
, depending on your configuration, to contain the new password. -
Start the
pe-puppetdb
service on the console server by runningpuppet resource service pe-puppetdb ensure=running
Configure excluded facts
Use the facts_blacklist
parameter exclude facts from being stored in the
PuppetDB database.
To specify which facts you want to exclude using Hiera:
-
Add the following to you default
.yaml
file and list the facts you want to exclude. For example, to exclude the factssystem_uptime_example
andmountpoints_example
:
puppet_enterprise::puppetdb::database_ini::facts_blacklist:
- 'system_uptime_example'
- 'mountpoints_example'
Copied!
-
To compile changes, run
puppet agent -t