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

log() fails on idle log file - item set to error state

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: False Positive
    • Icon: Trivial Trivial
    • None
    • 7.0.4
    • None
    • None

      This seems the same behavior of ZBX-24097 but on log().

      Steps to reproduce:

      1. Create an item like: log['/tmp/ALERT.LOG.TXT',,,,skip] on an host with zabbix-agent2 ( the file is not present at this moment ). The item become "not supported" with "Cannot obtain information for file "/tmp/ALERT.LOG.TXT": [2] No such file or directory" ( that's correct )
      2. create the file on the host: touch /tmp/ALERT.LOG.TXT". The item becom supported. 
      3. Wait for the "Update interval" without writing to the file. The item become "not supported" with "Cannot obtain information for file "/tmp/ALERT.LOG.TXT": [2] No such file or directory"
      4. Write something to the file, e.g "# echo "test" >> /tmp/ALERT.LOG.TXT". After the "update interval" the item becom supported. The "test" appears in history for the item.
      5. Wait some time, The item become "not supported" with "Cannot obtain information for file "/tmp/ALERT.LOG.TXT": [2] No such file or directory"

       

      Here the log from zabbix-server:

      [root@SRVZABBIX01 ~]# tail -f /var/log/zabbix/zabbix_server.log  | grep ALERT.LOG.TXT
      2421525:20241025:093213.004 item "srvoem01-emrepo19:log["/tmp/ALERT.LOG.TXT",,,,skip]" became supported
      2421525:20241025:093315.022 item "srvoem01-emrepo19:log["/tmp/ALERT.LOG.TXT",,,,skip]" became not supported: Cannot obtain information for file "/tmp/ALERT.LOG.TXT": [2] No such file or directory2421525:20241025:093913.004 item "srvoem01-emrepo19:log["/tmp/ALERT.LOG.TXT",,,,skip]" became supported
      2421525:20241025:093915.062 item "srvoem01-emrepo19:log["/tmp/ALERT.LOG.TXT",,,,skip]" became not supported: Cannot obtain information for file "/tmp/ALERT.LOG.TXT": [2] No such file or directory

       

      Clearly is not correct the "No such file or directory", nor the "not supported" message. It should be supported, as the file is there, only has not been modified.

       

      Attached you can find the DebugLevel=5 log file for the agent.

            zabbix.support Zabbix Support Team
            Pigi_102 Pierluigi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: