1

Currently my Grafana Dashboard reads system info from the Grafana agent that runs on my machine.

I have a script that executes hourly to do some action. If the script executes successfully then it can output that success to an XML file or create a file called "success.txt". If the script fails then it could create a file "fail.txt".

How can I get Grafana to check for the presence of a file or a file's content to get it to report back to the dashboard the status, basically a binary result, of a custom metric "Hourly script job" such as success or fail?

I've searched the web and found any-json-to-metrics exporter but not sure that'll work. I'd like to avoid hosting a web server that exposes endpoints. I'd like for the Grafana agent to pick up the custom metrics.

0 Answers0