Philip Kirkbride
Philip Kirkbride

Reputation: 22879

Puppet agent logging on Ubuntu?

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.

Upvotes: 1

Views: 2243

Answers (2)

user6907792
user6907792

Reputation:

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.

Upvotes: 2

Philip Kirkbride
Philip Kirkbride

Reputation: 22879

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.

Upvotes: 1

Related Questions