Ad Widget

Collapse

The agent starts reading the log file from the point it stopped the previous time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brownguy
    Junior Member
    • Feb 2015
    • 3

    #1

    The agent starts reading the log file from the point it stopped the previous time

    Hello Everyone,

    like the title states "The agent starts reading the log file from the point it stopped the previous time"

    that is my problem....

    I made a simple batch file that creates a log file with statistics of my machine. But instead of wasting my time with log rotation, my employer decided that we do not need any historical information about this .log file. However Zabbix does not "rereading" file and continues from where it is left off (end of the .log), as stated above.

    The batch file simply deletes the old .log and replaces it with the new .log file, exact same text inside the file.

    Anyway to get around it?
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Did you try to play "dirty" with zabbix agent?
    Do not modify the last modification time of log files with 'touch' utility, do not copy a log file with later restoration of the original name (this will change the file inode number). In both cases the file will be counted as different and will be analyzed from the start, which may result in duplicated alerts.
    Sincerely yours,
    Aleksey

    Comment

    Working...