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
On *nix nodes, the agent service logs its activity to the syslog service. Your syslog configuration dictates where these messages are saved, but the default location is /var/log/messages on Linux, /var/log/system.
The puppet. conf file is always located at $confdir/puppet. conf . Although its location is configurable with the config setting, it can be set only on the command line.
Puppet agent is a software application, provided by Puppet labs, which runs on any node in Puppet cluster. If one wants to manage any server using the Puppet master, the Puppet agent software needs to be installed on that particular server.
Puppet master is the server software that runs on the puppet master node. Install the Puppet server using below command. sudo apt install -y puppetserver. Puppet server is now installed, do not start the puppet server service yet.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With