• Ошибки rsyslogd типа rsyslogd: sd_journal_get_cursor() failed: 'Cannot assign requested address' [v8

 #10288   IgorA100
 08 янв 2020, 22:15
Для начала нужно проверить конфигурационный файл (как правило это: /etc/rsyslog.conf) командой:
Код: Выделить всё$ sudo rsyslogd -N6 | head -10
где "N6" - уровень, который может быть от 0 до 7 (https://voxlink.ru/kb/linux/nastrojka-l ... ganalyzer/)
Вывод должен быть примерно такой:
Код: Выделить всё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/