Monitoring for file updates
We have a windows share that contains a number of document templates. I would like to be alerted if/when any of these templates is updated, and get an alert containing the name of the updated template. (It is reasonable for these templates to be updated, but can cause issues if this is not expected)
Is this possible? Is there an existing datasource that could do this?
Tim_OShea
Posted 2 years ago·Last reply 2 years ago
1 comment
LM User
·2 years agoSince you want the name of the file that changed and these files a probably not plain text files, you'd simply do a multi-instance, batchscripted datasource. How you write the path will depend on how the share is accessed by the collector. You can use a local path or a UNC path, just make sure that the credentials used to run the collector process have access to the path.
Your discovery script would look like this:
Then your collection script would look like this:
Then create a datapoint using "Content the script writes to standard output" and "multi-line key-value pairs" and where the key is "##WILDVALUE##.lastModifiedHoursAgo".