Ad Widget

Collapse

Logfile Monitoring: Minimum logfile size change NOT to be considered a new file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wingnut2dot0
    Junior Member
    • Mar 2023
    • 1

    #1

    Logfile Monitoring: Minimum logfile size change NOT to be considered a new file

    Hello - Using logrt and agent_2 to monitor some logfiles I have created.
    The logfile has been designed for zabbix to only provide the required information with the idea of making the parsing by zabbix as easy as possible.
    The log updates every few minutes, but only adds a line or two to the file.

    What I am experiencing is that all values are being sent repeatedly.
    From the zabbix agent log entries below, it appears as though the time stamp updates but due to the file size not changing, its seen as a new file and I receive all values again.

    Looking at the actual log I can see the updates occurring ever 2 minutes.

    Is this expected behavior? Is there a minimum threshold for the size of the log to NOT be considered new? Does this require the maxdelay parameter?
    Any suggestions to help get this working correctly would be greatly appreciated - Thank you.


    Code:
    2023/03/24 16:03:43.012065 the modification time of log file "E:\\HealthCheck\\minimal-2023.03.22.log has been updated without changing its size, try checking again later
    2023/03/24 16:03:44.034124 after changing modification time the size of log file "E:\\HealthCheck\\minimal-2023.03.22.log still has not been updated, consider it to be a new file
    2023/03/24 16:05:41.164100 the modification time of log file "E:\\HealthCheck\\minimal-2023.03.22.log has been updated without changing its size, try checking again later
    2023/03/24 16:09:39.038926 the modification time of log file "E:\\HealthCheck\\minimal-2023.03.22.log has been updated without changing its size, try checking again later
    2023/03/24 16:19:40.011439 the modification time of log file "E:\\HealthCheck\\minimal-2023.03.22.log has been updated without changing its size, try checking again later
    2023/03/24 16:21:38.018012 the modification time of log file "E:\\HealthCheck\\minimal-2023.03.22.log has been updated without changing its size, try checking again later
    2023/03/24 16:21:39.034071 after changing modification time the size of log file "E:\\HealthCheck\\minimal-2023.03.22.log still has not been updated, consider it to be a new file
    2023/03/24 16:27:42.014230 the modification time of log file "E:\\HealthCheck\\minimal-2023.03.22.log has been updated without changing its size, try checking again later
    2023/03/24 16:35:41.017607 the modification time of log file "E:\\HealthCheck\\minimal-2023.03.22.log has been updated without changing its size, try checking again later
    2023/03/24 16:35:42.023665 after changing modification time the size of log file "E:\\HealthCheck\\minimal-2023.03.22.log still has not been updated, consider it to be a new file
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Consider looking up logfile monitoring related info from docs.. https://www.zabbix.com/documentation...ypes/log_items There a lot of things, that agent keeps about each logfile...

    How can you add lines, but not increase in file size? This means you drop some lines also? For agent this means complete rewrite of log... Change of every saved parameter about that logfile... and forcing reading from beginning.

    Comment

    Working...