2

I installed puppet on Fedora 22 using the package provided by the fedora dnf repo. Everything is working great. I get configurations applied from the puppet master just fine. However, I would like to see notices when configurations are applied. I assumed that since that these would show up in /var/log/puppet, but that directory is empty even when it's recently applied a new configuration from an interval run.

Here is how I start the puppet agent:

systemctl start puppet

Here is my log config:

[root@host ~]# puppet agent --configprint all |grep -i log
agent_catalog_run_lockfile = /var/lib/puppet/state/agent_catalog_run.lock
catalog_cache_terminus = json
catalog_terminus = rest
log_level = notice
logdir = /var/log/puppet
masterhttplog = /var/log/puppet/masterhttp.log
puppetdlog = /var/log/puppet/puppetd.log
syslogfacility = daemon
use_cached_catalog = false
[root@host ~]# 

Here is the puppet command running:

[root@host ~]# ps aux |grep puppet
root      9610  0.0  3.7 252104 37868 ?        Ssl  20:43   0:01 /usr/bin/ruby-mri /usr/bin/puppet agent --no-daemonize
root     11520  0.0  0.2 114328  2100 pts/0    S+   21:25   0:00 grep --color=auto puppet
[root@host ~]# 

So it looks like based on the config, log_level is set to Notice and logs should be put in /var/log/puppet.

There is a /var/log/puppet directory but it's empty, even though I know puppet is running and applying new configs, because I see the changes showing up on the agent host.

Can anyone tell me how to actually get logs written on the agent?

Thank you!

Jared Sprague
  • 229
  • 4
  • 12
  • 1
    did you check in syslog or /var/log/messages? – BMW Feb 01 '16 at 03:11
  • /var/log/messges was removed in Fedora 20+, but I can see the logs if I do: `journalctl -u puppet.service` However I would still like to know how to configure it to send logs to /var/log/puppet – Jared Sprague Feb 01 '16 at 13:50
  • do you have `rsyslog` running (it is not installed by default)? Do you have `rsyslog` configured to forward the logs from journal to your file? Dos your `/var/log` socket exists? – Jakuje Feb 01 '16 at 18:31

1 Answers1

1

So I've decided to use journalctl to view the logs, I wasn't use to this before but I find it even nicer than tailing a regular log file:

journalctl -u puppet -f

Jared Sprague
  • 229
  • 4
  • 12