Estou executando um servidor DNS ocupado que registra consultas em um servidor remoto via rsyslog.
Devido à quantidade de tráfego que estamos processando, tive que aumentar os limites de taxa em rsyslog.conf.
Este servidor está processando no pico ~ 1.2K solicitações de DNS / segundo, o que significa um tráfego de saída de ~ 2Mbps para o registrador remoto.
No entanto, ao usar a diretiva $AddUnixListenSocket /var/named/chroot/dev/log
rsyslog, vejo uma redução drástica nos dados enviados ao servidor remoto.
Sem esta diretiva está tudo bem, exceto que, após um rsyslog reiniciar, o registro será interrompido, exigindo também o reinício do BIND.
Parece que adicionar $AddUnixListenSocket
"quebra" o aumento do limite de taxa no rsyslog. O que está acontecendo aqui?
Versões de software:
- CentOS 6.7 x86_64
- rsyslog-5.8.10-10.el6_6.x86_64
- bind-9.8.2-0.37.rc1.el6_7.2.x86_64
Meu /etc/rsyslog.conf
:
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$SystemLogRateLimitInterval 10
$SystemLogRateLimitBurst 15000
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$IncludeConfig /etc/rsyslog.d/*.conf
*.info;mail.none;authpriv.none;cron.none /var/log/messages
authpriv.* /var/log/secure
mail.* -/var/log/maillog
cron.* /var/log/cron
*.emerg *
uucp,news.crit /var/log/spooler
local7.* /var/log/boot.log
e /etc/rsyslog.d/fwd.conf
:
# keep logging after rsyslog restart
$AddUnixListenSocket /var/named/chroot/dev/log
# ### 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.
$WorkDirectory /var/lib/rsyslog # where to place spool files
$ActionQueueFileName tso_fwd # unique name prefix for spool files
$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
$ActionQueueMaxFileSize 100M # AF: limit open file descriptors
$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
$ActionQueueType LinkedList # run asynchronously
$ActionQueueTimeoutEnqueue 0 # AF: discard when queue is full
$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.* @@1.1.1.1:514
& ~
# ### end of the forwarding rule ###