Я отправляю журналы своего Asterisk в Graylog. (он работает нормально) Но rSyslog записывает журнал каждой звездочки в /var/log/messages
не к /var/log/asterisk/full
.
Asterisk logger.conf:
[general]
;rotatestrategy=timestamp
[logfiles]
console => notice,error,warning
messages => notice,warning,error
full => notice,warning,error,debug,verbose,dtmf,fax
warning => warning
error => error
syslog.local0 => warning,error
rSyslog.conf:
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local0.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog
# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg :omusrmsg:*
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
local0.* /var/log/asterisk/full
# ### begin forwarding rule ###
# The statement between the begin ... end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
#$ActionQueueFileName fwdRule1 # unique name prefix for spool files
#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
#$ActionQueueType LinkedList # run asynchronously
#$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
#*.* @@remote-host:514
local0.* @172.16.10.234:9901
# ### end of the forwarding rule ###
Как я могу это отключить? А пытался добавить local0.none
к /var/log/messages
линия, но она не работает.
(Английский не является моим родным языком; прошу прощения за любые ошибки с моей стороны. И спасибо за помощь.)
Во-первых, перезапустили ли вы демон rsyslog после изменения файла rsyslog.conf?
перезапуск службы sudo rsyslog