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

logrt may continue reading an old file repeatedly.

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.12, 2.2.3
    • Fix Version/s: 2.0.13rc1, 2.2.4rc1, 2.3.1
    • Component/s: Agent (G)
    • Labels:
    • Environment:
      RHEL6.5

      Description

      When the size of a file new after log rotation is 0 byte, reading the log of an old file will be continued.

      --after log rotation
      Zabbix
      key_=logrt[/var/log/test.log]
      lastlogsize=1000
      mtime=5/16 19:23

      old file
      filename=test.log-20140517
      logsize=1000
      mtime=5/16 19:23

      new file
      filename=test.log
      logsize=0
      mtime=5/17 03:06

      --In process_logrt() First

      ?process_log()
      It reads to the last of the old file.
      ?if (i != logfiles_num - 1)
      lastlogsize is set as zero.
      ?process_log()
      Since file size is the same as lastlogsize, mtime is not updated but it returns SUCCESS.

      lastlogsize=0 ?Only lastlogsize is updated.
      mtime=5/16 19:23

      --In process_logrt() Second....

      ?process_log()
      It reads to the last of the old file.
      ?if (i != logfiles_num - 1)
      lastlogsize is set as zero.
      ?process_log()
      Since file size is the same as lastlogsize, mtime is not updated but it returns SUCCESS.

      lastlogsize=0 ?Only lastlogsize is updated.....
      mtime=5/16 19:23

        Attachments

        1. for_2.2.3.patch
          0.5 kB
          Yoshinori Komuro
        2. zbx-8238-2.0.12.patch
          0.8 kB
          Andris Mednis
        3. zbx-8238-2.2.3.patch
          0.8 kB
          Andris Mednis

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zinten Yoshinori Komuro
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: