Для начала нужно проверить конфигурационный файл (как правило это: /etc/rsyslog.conf) командой:
Вывод должен быть примерно такой:
Если выводится ошибка типа:
После правки конфигурационного файла, нужно перезапустить демона:
Проверить логирование:
Если установлено логгирование трафика через iptables используя в Webmin : "Networking -> Bandwidth Monitoring", то в файле "/etc/rsyslog.conf" появится в конце такая строка: kern.=debug -/var/log/bandwidth". В "iptables" будет указаны правила для логгирования, а сам лог будет находиться в "/var/log/bandwidth". При этом может выскакивать ошибка типа:
из за очень частой записи логов. Для увеличения лимита нужно в файл "/etc/rsyslog.conf" добавить строки:
что означает лимит 200000 сообщений за 600 секунд.
Systemd Journal Rate Limiting
How do we know if the journal limits are actually causing us to drop log messages? Generally you will see similar messages in the log files as below.
In this particular case we have a DNS server running Bind which is logging all DNS queries. 7124 messages were suppressed and dropped (not logged) because they were coming in too fast in this example.
By default systemd allows 1,000 messages within a 30 second period.
The limits are controlled in the /etc/systemd/journald.conf file.
If more messages than the amount specified in RateLimitBurst are received within the time defined by RateLimitInterval, all further messages within the interval are dropped until the interval is over.
You can modify these values as you see fit, you can completely disable systemd journal logging rate limiting by setting both to 0.
If you make any changes to /etc/systemd/journald.conf you will need to restart the systemd-journald service to apply the changes.
https://www.rsyslog.com/changing-the-settings/
Код: Выделить всё
где "N6" - уровень, который может быть от 0 до 7 (https://voxlink.ru/kb/linux/nastrojka-l ... ganalyzer/)$ sudo rsyslogd -N6 | head -10
Вывод должен быть примерно такой:
Код: Выделить всё
rsyslogd: version 7.2.6, config validation run (level 6), master config /etc/rsyslog.conf
rsyslogd: End of config validation run. Bye.
Если выводится ошибка типа:
Код: Выделить всё
значить есть проблема в конфигурационном файле.rsyslogd: unknown priority name "" [v8.24.0-34.el7]
После правки конфигурационного файла, нужно перезапустить демона:
Код: Выделить всё
systemctl restart rsyslog
Проверить логирование:
Код: Выделить всё
/usr/bin/logger -s "Test message"
Если установлено логгирование трафика через iptables используя в Webmin : "Networking -> Bandwidth Monitoring", то в файле "/etc/rsyslog.conf" появится в конце такая строка: kern.=debug -/var/log/bandwidth". В "iptables" будет указаны правила для логгирования, а сам лог будет находиться в "/var/log/bandwidth". При этом может выскакивать ошибка типа:
Код: Выделить всё
rsyslogd: imjournal: 147464 messages lost due to rate-limiting (20000 allowed within 600 seconds)
из за очень частой записи логов. Для увеличения лимита нужно в файл "/etc/rsyslog.conf" добавить строки:
Код: Выделить всё
$SystemLogRateLimitInterval 600
$SystemLogRateLimitBurst 200000
$ModLoad imjournal
$imjournalRatelimitInterval 600
$imjournalRatelimitBurst 200000
что означает лимит 200000 сообщений за 600 секунд.
Systemd Journal Rate Limiting
How do we know if the journal limits are actually causing us to drop log messages? Generally you will see similar messages in the log files as below.
Код: Выделить всё
Jan 9 09:18:07 server1 journal: Suppressed 7124 messages from /system.slice/named.service
In this particular case we have a DNS server running Bind which is logging all DNS queries. 7124 messages were suppressed and dropped (not logged) because they were coming in too fast in this example.
By default systemd allows 1,000 messages within a 30 second period.
The limits are controlled in the /etc/systemd/journald.conf file.
Код: Выделить всё
RateLimitInterval=30s
RateLimitBurst=1000
If more messages than the amount specified in RateLimitBurst are received within the time defined by RateLimitInterval, all further messages within the interval are dropped until the interval is over.
You can modify these values as you see fit, you can completely disable systemd journal logging rate limiting by setting both to 0.
If you make any changes to /etc/systemd/journald.conf you will need to restart the systemd-journald service to apply the changes.
Код: Выделить всё
systemctl restart systemd-journald
https://www.rsyslog.com/changing-the-settings/