Need Assistance - Can Grafana count files in a folder?

Hi Everyone,
I apologies in advance if this question has been asked and answered. I have a production server that I need to monitor a folder, and trigger an alert if the files have not been processed after a period of time. I have been looking on the web, and have not found any information on doing this. I would appreciate any pointers as to where to look.

Thanks
–MIke

1 Like

I would also be interested in this. Does anyone have any advice?

you could do it via plugins that use javascript or create a cron job with python or powershell to populate a table or write to a log file then have grafana read that.

1 Like

What I ended up doing this outside of Grafana. I wrote a small powershell script that basically takes a snapshot of the target folder, and if it finds files, it snoozes for a period of time, and checks again. If there are still files there, it then fires off an email to our ticketing system to raise the alert that it needs to be looked at, and it is all run from a windows task that runs ever 15 minutes.

hope this provides some insight as to how I went about coming up with a solution to the problem.

1 Like

might want to add some logging in there as well

time,filename

Yeah I found that Grafana doesn’t have the feature set to help with this. Alerting leaves a lot to be desired Create an alert from a bool value - #2 by mattabrams
I ended up just making an AzureDevOps Pipeline that send out an email using PowerShell