Ad Widget

Collapse

How to best use log[]with a file that doesn't change size, but modified date changes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ennova
    Junior Member
    • Sep 2019
    • 1

    #1

    How to best use log[]with a file that doesn't change size, but modified date changes

    I am trying to monitor a file for a very specific error, the problem I have is that the application (of which I don't control) is changing the modified date of the file without changing its contents. As such, the entire file is re-read and I get a lot of repeated data. What is the best approach to solve this?

    Thank you,
  • andris
    Zabbix developer
    • Feb 2012
    • 228

    #2
    Instead of log[] you can try to use logrt[] (with pretty strict file name regexp to match only desired file) with parameter 'options' set to copytruncate.
    I haven't tested it but it might do the trick.

    Comment

    Working...