Reputation: 95
I have setup an alerting system between Loki and AlertManager and it’s working well. I can create an alert based on a rate of logs or a single occurence of a log. What i’m trying to do now is to send an alert when a log appear (new alarm) and stop it when another log is seen (deleted alarm).
I have the following two logs one that should trigger an alarm and as long as the second one isn't there the alarm should still fire.
count_over_time({app="alarm-handler"} | json | message="New alarm" [1m])
count_over_time({app="alarm-handler"} | json | message="Deleted alarm" [1m])
Upvotes: 0
Views: 22