What we did is we have scheduled a cron job on OS every 1 hour to submit a metric via REST API or OA ingest interface with "1" or "0" values if a folder/file we wanted to be is there.
Depending on what you need, there is an option to use a oneagent extension for monitoring files. We use an extension that checks:
And the extension creates a Dynatrace problem opening event when the number of files is higher than expected or a file has not been modified in a defined period.
If you are interested, please tag me in this thread and I'll be happy to provide it.
Hey @DanielS / @Radoslaw_Szulgo / @rajdeepan03
you can find the extension including code here:
To use it, just download the file named custom.python.filechange.zip from the release and upload it in your Dynatrace environment and deploy it to OneAgents where required.
I think it's quite straightforward to configure, but nevertheless here is a screenshot of the configuration:
You can add any number of wildcard patterns and you can also modify the problem even text and title message and use placeholders.
This is an example of problem created when old files are found:
Hope this helps someone 😀