1
votes

I'm looking for the logs on a puppet agent on Ubuntu. According to the Puppet documentation it should be in /var/log/messages.

Logging for Puppet agent on *nix systems When running as a service, Puppet agent logs messages to syslog. Your syslog configuration dictates where these messages are saved, but the default location is /var/log/messages on Linux, /var/log/system.log on Mac OS X, and /var/adm/messages on Solaris.

I've set log_level to debug. I don't seem to have a /var/log/messages file. I do have folders /var/log/puppetlabs/puppet and /var/log/puppetlabs/pxp-agent but both of these folders are empty.

Edit: Reading that the default logdir is /var/log/puppetlabs/puppet. But I never have log files when I look. Striking out because I think this applies to puppet server not the agent.

2
I thought /var/log/messages is a standard file for logging system messages on all Linux. It really does not exist? - Matt Schuchard
@MattSchuchard No I have an ARM device and a Docker version and neither have a /var/log/messages file. I'm running Ubuntu Server 14.04 on both. - Philip Kirkbride
@MattSchuchard maybe it's an issue with logging in general. I found a general logging file at /var/log/syslog on the ARM version. It contains logs from several programs including puppet. - Philip Kirkbride
Ok; I triple-checked the documentation and the claim is that file is universal for logging on Linux, which is what I thought. If you found counter-examples, then that cannot be denied. - Matt Schuchard
Well, it seems like you found your answer, right? I am pretty sure this is the full extent of logging on a local system and if you want anything better you are looking at a reporter that ties in with PuppetDB. - Matt Schuchard

2 Answers

2
votes

If you are running Ubuntu 16.04 you can run the following to see the Puppet agent logs:

journalctl -u puppet.service

Hope this helps.

1
votes

I found that Ubuntu stopped using /var/log/messages as far back as Ubuntu 11, in 2011. It now uses /var/log/syslog.

I foud this unix exchange answer with more information:

Ubuntu no longer uses the /var/log/messages file by default. The same information is available in the file /var/log/syslog. You can re-enable logging to /var/log/messages if you would like.

Ubuntu no longer uses the /var/log/messages file by default. The same information is available in the file /var/log/syslog. You can re-enable logging to /var/log/messages if you would like.

Syslog is a standard logging facility. It collects messages from various programs, including the kernel. It is usually configured to store these messages by default. How it stores these messages is generally distribution-dependant. /var/log/messages is generally used to store non-critical messages while /var/log/syslog stores everything, including critical and non-critical messages.