> For the complete documentation index, see [llms.txt](https://omalab.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://omalab.gitbook.io/guide/engineering-wiki/monitoring-and-alerting/get-notified-when-a-metric-reaches-a-certain-threshold.md).

# Get notified when a metric reaches a certain threshold

Seyren is available here:<http://graphite.omamatic.com:8080/>

It is a simple mechanism to monitor metrics from <http://graphite.omamatic.com/> and send messages when they go above or below a certain threshold.

## Example

Goal: We wan't to make sure we get notified into slack alerts if Facebook Mention(s) being retreived.

Mentions come from`OpportunityPipeline::Retriever::Facebook`and since this is a standard worker that has methods from`Oma::Resque::Queue`there exist a metric that counts how many times it ran.

```
stats.counters.oma_processors.production.opportunity_pipeline.retriever.facebook.process_iteration.success.count
```

*Note how OpportunityPipeline::Retriever::Facebook is represented in the metrics name.*

### Explaining check's fields

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

### Subscription

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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://omalab.gitbook.io/guide/engineering-wiki/monitoring-and-alerting/get-notified-when-a-metric-reaches-a-certain-threshold.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
