Ad Widget

Collapse

Zabbix log rotation monitor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Genya94
    Junior Member
    • Nov 2022
    • 3

    #1

    Zabbix log rotation monitor

    Hi all,

    We are using Zabbix to monitor log files and stumbled upon some questions\problems that we would be glad to get some insights on.
    We have a system that creates a log file hourly with a changing name "logfile_yyyymmddhhmm.log" so Zabbix knows to take the latest modified logfile but how can I make sure it has read all the lines in the log before that?
    For example, a log named "logfile_20250251600.log" gets modified at 16:57, and a new log is created at 17:00 how can be sure that Zabbix read all the lines in the log off at 16:00 if the reading interval is 5 minutes?

    Thank you in advance for your help!
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You can be sure, that Zabbix will skip that last 3 minutes of logfile and continues with new one.
    I have couple of times stepped on same rake.. logrotate creates a new one and old one is not yet read to the end... only thing is to shorten the reading time as much as possible.. 1s is there by default... And even with a 1s you may lose some, if you have some very fast growing files...

    Comment

    Working...