logrt re-reads old lines

XMLWordPrintable

    • Type: Incident report
    • Resolution: Commercial support required
    • Priority: Trivial
    • None
    • Affects Version/s: None
    • Component/s: Agent (G)
    • None
    • Environment:
      Zabbix Server 5.0.1
      Zabbix agent 2.2.9 on AIX 6.1 (6100-09-04-1441)

      Steps to reproduce:

      1. LLD creates a logrt item with a regexp matching only one rotated log file (screenshot 2)
      2. Key : logrt["/m/0190/s/xebiz/tux/^ULOG.[0-9]{6}$","_CAT:[0-9]+: ERROR",,,skip] (screenshot 1)
      3. Write entries

      Result:

      Sometimes, the file is re-read, but I don't know why or how... (screenshot 3)

      The log size is always increasing (screenshot 5) and the log directory last modification date tends to indicate that the log hasn't been recreated (screenshot 6).

      these entries are indeed not actually from 08:00:53 (screenshot 4)

      Agent logfile is full of this error :

      tr: Invalid combination of options and Strings.tr: Invalid combination of options and Strings.Usage: tr [ [-c|-C] | -[c|C]ds | -[c|C]s | -ds | -s ] [-A] String1 String2       tr { -[c|C]d | -[c|C]s | -d | -s } [-A] String1usage: grep [-r] [-R] [-H] [-L] [-E|-F] [-c|-l|-q] [-insvxbhwyu] [-p[parasep]] -e pattern_list... [-f pattern_file...] [file...]usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwyu] [-p[parasep]] [-e pattern_list...] -f pattern_file... [file...]usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwyu] [-p[parasep]] pattern_list [file...]

      Expected:
      Old entries not re-read.
      See attached patch file...

        1. 1- logrt_item_key.png
          1- logrt_item_key.png
          14 kB
        2. 2- ulog_last_file.png
          2- ulog_last_file.png
          13 kB
        3. 3- logrt_item_datas.png
          3- logrt_item_datas.png
          32 kB
        4. 4- ULOG.012821.png
          4- ULOG.012821.png
          39 kB
        5. 5- last_ulog_file_size.png
          5- last_ulog_file_size.png
          20 kB
        6. 6- last_ulog_file_creationTime.png
          6- last_ulog_file_creationTime.png
          1 kB
        7. 7- logrt_item_datas_20210205.png
          7- logrt_item_datas_20210205.png
          37 kB
        8. 8-20210205_extract_zabbix_agentd.log
          7 kB
        9. 9-20210205_extract_zabbix_agentd.png
          9-20210205_extract_zabbix_agentd.png
          78 kB
        10. zabbix_agentd_debug.log
          1.17 MB

            Assignee:
            Oleksii Zagorskyi
            Reporter:
            FK
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: