Skip to content

Commit

Permalink
docs: Add recording rule documentation
Browse files Browse the repository at this point in the history
Add recording rule documentation to the
README

Signed-off-by: Homaja Marisetty <[email protected]>
  • Loading branch information
hmariset committed Feb 28, 2024
1 parent aecc1df commit 2f40709
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,29 @@ especially in the case in which the exporter is external to the code it's monito

For more detailed documentation on [Availability exporters](https://gitlab.cee.redhat.com/konflux/docs/documentation/-/blob/main/o11y/monitoring/availability_exporters.md?ref_type=heads)

## Recording Rules

Recording rules allow us to precompute frequently needed or computationally expensive expressions
and save their result as a new set of time series. Recording rules are the go-to approach for
speeding up the performance of queries that take too long to return. When other teams want to go
with their own metrics format for exporters they need to adapt to desired metric form by
translating it using a recording rule.

These recording rules should be put in the [rhobs/recording folder](https://github.com/redhat-appstudio/o11y/tree/main/rhobs).

The standard format is single availability metric `konflux_up` with labels `service` and `check`.
Each time series will have the service and check labels for the name of the originating service
and availability check it performed, respectively. The metric konflux_up should return either 0
or 1 based on the availability of the component/service. If the service is up then the metric
should return 1 else 0.

Recording rule example provided here has below format
```
grafana_ds_up(check=prometheus-appstudio-ds) -> konflux_up(service=grafana, check=prometheus-appstudio-ds)
```

For more detailed documentation on [recording rules](https://docs.google.com/document/d/1Y72T10JGuJaeyeNexmS_qTHfDB8uxxq0zERRRSOZegg/edit?usp=sharing)

## Support

- Slack: [#forum-konflux-o11y](https://app.slack.com/client/E030G10V24F/C04FDFTF8EB)

0 comments on commit 2f40709

Please sign in to comment.