I was wondering if there is a more rsyslog friend way to configure logrotate to avoid rsyslog restart. I have attempted to update the logrotate file to not use the pid file at all to avoid future issues but this is not working as expected. I am trying to configure logrotate that it restarts rsyslog after its completed rotating the logs. I placed the following in my nf for one of the logs for testing purposes. Rsyslog writing to old file after logrotate stack overflow. To understand why seven syslog files are retained by default, take a look at this section of the etclogrotate. Except after the logrotate job runs, about half the devices logs just stop being logged too, until i manually reload syslog. We need to rotate syslog files once they reach a certain size. Its almost like rsyslog, just doesnt save logs for half the devices until i restart rsyslog. I noticed that each time logrotate runs on my rhel 5.
Logrotate causes rsyslogd to stop working after log rotation. Every time after newsyslog rotates the log file, syslog stops logging into the file. You are using an rsyslog mechanism to send your logs to a centralized server, but as soon as the logrotate is executed on the server, no log is. How log rotation works with logrotate network world. Rsyslog stops sending data to remote server after log rotation. Doing so prevents splunk software from recognizing log files across. I noticed that, right after a log rotation, the data is not being indexed anymore. This worked fine for years until recent changes in the centos build related to the pid file. It seems you are not interested in why rsyslog is restarting due to logrotate usually but you are asking why the format is different while its not running.
After logrotate, rsyslog should begin writing to a new file. Rsyslog not writing to some files after logrotate issue. Is rsyslog opening a new socket when logrotate rotates its logs and hups it. Weve excluded kernel messages from the syslog, and put a stop on. During file rotation rsyslog stop sending logs to central syslog server.
This is happening on a number of machines i work on. On linux which uses logrotate, we can solve this by doing syslog rsyslog restart in the postrotate section of the logroate conf. After restart rsyslog service rsyslog restart mail. Rsyslog stops working after logrotate bg go further. This could otherwise be titled, rsyslog reload does not create log files. Logging cisco router information to linux debian rsyslog, and log rotation with logrotate. Some older versions of rsyslog may have trouble resuming on a log file after the log rotate has run. Yes, the scratch build also crashes, apparently due to stack overflow caused by infinite recursion in the rate limiter. The issue gets resolved when i manually restart rsyslog. The nf file is used to control which log messges from which services appear in. Why does data stop getting indexed after a log rotation.
1148 874 742 780 1680 732 1351 692 867 468 646 1128 8 1319 143 222 146 889 493 1665 722 186 671 650 1305 1685 1126 270 1088 544 1283 617 1362 529 155 1459 749 268 244 314 1107 32 1363 172 943 305