I'm comparing two files and getting the output as 'Success' if both the files match. I'm trying to set an alert when I receive the output as 'Failure' to gmail. What is the best way I can setup the alert? Note: I'm using Python code for comparision. Need to run the code on kubernetes.
Asked
Active
Viewed 44 times
-4
-
It is unclear what help do you need. In general you need to expose some metric to Prometheus, configure Prometheus to scrape the metric, and write an alert rule for it. Then you can adjust Alertmanager configuration to send notifications via email. Writing each step in an answer would take a lot of effort for nothing as there are countless guides for each of the stages I mentioned. – anemyte May 31 '21 at 22:22
1 Answers
0
This is not something Prometheus has a specific thing for. You would have to write your own exporter to create some kind of metrics (i.e. numeric) output that represents the info you care about, and then write alert rules based on that. Overall, you're probably barking up the wrong tree.

coderanger
- 52,400
- 4
- 52
- 75