Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-7098

logrt possibly read old log file from very beginning after log rotation

XMLWordPrintable

      logrt possibly read old log file from very beginning after log rotation if new log and old log has same timestamp

      How to reproduce:

      • Add item: logrt[/tmp/^testlog.*$]
      • Write some text to the log file: echo `date` >> /tmp/testlog
      • Zabbix agent read log file and send contents to Zabbix server
      • Write text and rotate log file: echo `date` >> /tmp/testlog; mv /tmp/testlog /tmp/testlog.1; touch /tmp/testlog /tmp/testlog.1
      • Zabbix agent check log files, but doesn't send last added line
      • Write text to new testlog: echo `date` >> /tmp/testlog
      • Zabbix agent read from very beginning of testlog.1

      The procedure above is simulation of logrotate, but this problem happened with logrotated.

            Unassigned Unassigned
            kodai Kodai Terashima
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: