dennyzhang / monitoring

Checks for various monitoring
9 stars 9 forks source link

check patterns in continuously log file => log_pattern_frequency.py #2

Open saibug opened 3 years ago

saibug commented 3 years ago

hi,

Thanks for the script, but i have one question. for example, if there is continously log file, on every check, it will start in the last line where it stopped ?

regards sai

saibug commented 3 years ago

any feedback ?

dennyzhang commented 3 years ago

--tail_log_num starts from the tail of the file.

It should work when log file is not very big. If the file is as big as GBs, there might be a performance issue.

https://github.com/dennyzhang/monitoring/blob/master/files/log_pattern_frequency.py#L68-L69

saibug commented 3 years ago

i agree with you, but in case the file is not fed ? it will return whole lines already read !! :/