redhat和centos的木偶日志文件

Hen*_* Vu 8 logging redhat centos puppet

我在CentOS和Redhat运行木偶代理.我想看看它的日志文件但找不到它.在这些操作系统中,我在puppet.conf中明确指定了logdir =/var/log/puppet,但在检查此目录时,它是空的.

请注意,我为Ubuntu和SUSE做了类似的事情并且运行良好.这个问题只发生在Redhat和CentOS上.知道在这些情况下在哪里查找日志文件?

谢谢,亨利

haj*_*muz 7

默认情况下,puppet的日志条目正在保存/var/log/messages(Redhat-Like Linux).

https://docs.puppetlabs.com/pe/latest/install_what_and_where.html#log-files

要登录/var/log/puppet/puppet.log,您可以取消注释相关的行/etc/sysconfig/puppet.

# The puppetmaster server
#PUPPET_SERVER=puppet

# If you wish to specify the port to connect to do so here
#PUPPET_PORT=8140

# Where to log to. Specify syslog to send log messages to the system log.
PUPPET_LOG=/var/log/puppet/puppet.log

# You may specify other parameters to the puppet client here
#PUPPET_EXTRA_OPTS=--waitforcert=500
Run Code Online (Sandbox Code Playgroud)