[英]Puppet agent logs on Fedora /var/log/puppet empty
I installed puppet on Fedora 22 using the package provided by the fedora dnf repo. 我使用fedora dnf存储库提供的软件包在Fedora 22上安装了木偶。 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. 我假设由于这些文件将显示在/ var / log / puppet中,但是即使最近从间隔运行中应用了新配置,该目录也为空。
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: 这是运行的puppet命令:
[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. 因此,根据配置,log_level设置为Notice,并且日志应放在/ 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. 有一个/ var / log / puppet目录,但是它是空的,即使我知道puppet正在运行并正在应用新配置,因为我看到了代理主机上显示的更改。
Can anyone tell me how to actually get logs written on the agent? 谁能告诉我如何实际在代理上写入日志?
Thank you! 谢谢!
因此,我决定使用journalctl来查看日志,我以前从未使用过它,但是我发现它比尾随常规日志文件更好:
journalctl -u puppet -f
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.