Search code examples
loggingpuppetrsyslog

Puppet agent not logging when master is located in the same node


I have been running puppet master and agent in a same node. While master works correctly, it seems the agent is not logging. I checked the /var/log/puppet folder and rsyslog, but they have nothing about the agent. I am using the following configuration:

[main]    
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server=name_of_the_server

[master]

# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

I have other nodes with only the agent that are logging correctly. Any ideas of what could be causing this?

Thanks in advance!


Solution

  • So, I decided to use journalctl to retrieve the logs. They were already available there. All I had to do was grep it:

    journalctl | grep puppet
    

    Just one observation: journalctl is non-persistant, which means it throws away the logs at every boot, so if you want to keep your logs you have to change this behaviour.