Get notified when a metric reaches a certain threshold
Last updated
Last updated
Seyren is available here:
It is a simple mechanism to monitor metrics from and send messages when they go above or below a certain threshold.
Goal: We wan't to make sure we get notified into slack alerts if Facebook Mention(s) being retreived.
Mentions come fromOpportunityPipeline::Retriever::Facebook
and since this is a standard worker that has methods fromOma::Resque::Queue
there exist a metric that counts how many times it ran.
Note how OpportunityPipeline::Retriever::Facebook is represented in the metrics name.
Sum all the count events that happened in the last 24 hours. When the value is below 500 changes state to WARN if below 100 change the state to 100.
Target: integral(counted_metric)
From: -24h
Warn: 500
Error: 100
See how the subscription is defined it's quite self explanatory the only part to understand there is how to write down the channel to which it should notify to.