By default, both global system messages and Puppet runs log to /var/log/messages/
. That can make it difficult to find critical system messages in the log. Use these steps to manage the location that Puppet runs log to with Puppet Enterprise.
Version and installation information
PE version: All supported versions
OS: *nix
Solution
Use the --logdest
option to change the log location for scheduled or manual Puppet runs.
Change the manual Puppet run log location
Changing the manual Puppet run log location affects only the current run and does not change where scheduled runs are logged.
-
Change the manual Puppet run log location using
puppet agent -t
with the--logdest
option.For example:
puppet agent -t --logdest /var/log/pe-puppet/agent.log
Change the scheduled Puppet run log location
Changing the scheduled Puppet run log location affects only scheduled runs and does not change where manual runs are logged. The log location persists on future runs.
- On the target node, edit the following file:
- All *nix (except for Debian):
/etc/sysconfig/puppet
- Debian:
/etc/default/puppet
Add the--logdest
option to thePUPPET_EXTRA_OPT
line, for example:PUPPET_EXTRA_OPTS=--logdest=/var/log/puppetlabs/agent.log
- All *nix (except for Debian):
- Restart the agent by running:
puppet resource service puppet ensure=stopped
puppet resource service puppet ensure=running
How can we improve this article?
0 comments
Please sign in to leave a comment.
Related articles