Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Puppet master: how to turn on logging?

Tags:

puppet

We have FOSS Puppet 3.8.1 running a master and at some point it started responding 500 to our clients at their request for catalog.

Having absolutely no idea what's wrong, I started searching for some logs and found nothing.

/etc/puppet/puppet.conf on master looks like

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=/lib/facter
pluginsync=true

[agent]
server=our-app.com
certname=cert-name

There is a /var/log/puppet folder, but it is empty.

Can someone help with finding where the errors are logged?

like image 691
Stepan Salin Avatar asked Dec 30 '25 19:12

Stepan Salin


1 Answers

On the puppetmaster, run this command

puppet config print |grep log

On my system this comes up with various useful looking paths like

masterhttplog = /var/log/puppet/masterhttp.log
httplog = /var/log/puppet/http.log
railslog = /var/log/puppet/rails.log
masterlog = /var/log/puppet/puppetmaster.log
puppetdlog = /var/log/puppet/puppetd.log

also for debugging the relationship of the puppetmaster and agents and for errors in manifest files the reports are useful

puppet config print |grep report

Note that the puppetmaster itself can also be a agent so there could well be stuff like a last_run_report.yaml which is concerning the puppetmaster configuring itself, but you maybe want to skip these

like image 150
Vorsprung Avatar answered Jan 05 '26 19:01

Vorsprung



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!