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