13 Sep 2024 02:16 PM - edited 19 Sep 2024 03:30 PM
Hello community, I could use your advice with something.
I'm trying to monitor the presence of a file on a given directory. The easiest and most simple solution would be to use the Filesystem Extension, which allows me to use a count to do just that.
The limiting factor is that the only available configurations for count are the following:
My problem:
The name of the log file I need to check for changes daily, because the date is appended to the daily created file.
So today I would need to look for 13092024_logfile.log
But tomorrow I'll have to check if 14092024_logfile.log is present, on the same directory. And yesterday's log file will be there too, so I can't do a simple count of files.
Given how common it is to append dates to log file names, I figured someone here must've dealt with this problem before.
Any insight, advice or counsel on how to deal with this situation would be greatly appreciated 😃
Solved! Go to Solution.
19 Sep 2024 03:43 PM
Double post, just in case someone bumps into the same issue I did. I found a solution on the same menu:
It wasn't immediately obvious for me, so I thought I'd share the solution anyway.
22 Sep 2024 11:38 AM
Hi,
If existing extensions are not matching your use case, you can always create your own script for checking file exist or not.
For example, script output can ingest "1" if exist; and "0" if not, using metric scripting integration.
Best regards