13

I am running puppet agent in CentOS and Redhat. I would like to see its log file but cannot find it. In these operating systems, I clearly specify logdir = /var/log/puppet in the puppet.conf, but upon checking this directory, it is empty.

Note that I did similar thing for Ubuntu and SUSE and it worked well. The issue only happened in Redhat and CentOS. Any idea of where to look for the log file in these cases?

Thanks, Henry

Henry Vu
  • 151
  • 1
  • 1
  • 5
  • Did you try examining /var/log/messages or /var/log/syslog (depending on your set up) for puppet entries? We user Centos6, and that is where puppet writes on both server and nodes. – thisfeller Jul 10 '13 at 13:39
  • There may be issues with the specific version of Puppet and the config file sections I guess. What's the output of `puppet agent --configprint logdir`? – Felix Frank May 05 '14 at 15:49

2 Answers2

10

By default, log entries of puppet is saving in /var/log/messages(Redhat-Like Linux).

https://docs.puppetlabs.com/pe/latest/install_what_and_where.html#log-files

For logging into /var/log/puppet/puppet.log, you can uncomment related line in /etc/sysconfig/puppet .

# The puppetmaster server
#PUPPET_SERVER=puppet

# If you wish to specify the port to connect to do so here
#PUPPET_PORT=8140

# Where to log to. Specify syslog to send log messages to the system log.
PUPPET_LOG=/var/log/puppet/puppet.log

# You may specify other parameters to the puppet client here
#PUPPET_EXTRA_OPTS=--waitforcert=500
hajimuz
  • 368
  • 3
  • 14
1

If you are looking for the log from a puppet run instead of all puppet logs, here is another method:

The summary (and report) of the last puppet run on a node are recorded in /var/lib/puppet/state/last_run_summary.yaml (and last_run_report.yaml). The report is a full log of the previous run, while the summary is brief overview.

They have information that you may not be able to easily get from the normal log file, which is useful if you just need to check the most recent puppet agent run.

ascendants
  • 2,123
  • 3
  • 11
  • 22