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
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