rSyslog - Отключить, чтобы отправлять пользовательские журналы в сообщения.

Я отправляю свои журналы 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 ###

Как это отключить? A попытался добавить local0.none в строку / var / log / messages , но это не сработало.

(английский не мой родной язык; прошу прощения за любые ошибки с моей стороны . И спасибо за помощь.)

0
задан 24 January 2018 в 12:51
1 ответ

Во-первых, перезапустили ли вы демон rsyslog после изменения файла rsyslog.conf?

sudo service rsyslog restart

0
ответ дан 5 December 2019 в 06:45

Теги

Похожие вопросы