Docs: Write "Create your first recording rule and alert" topic
Is your documentation request related to a feature? If so, which one?
Yes: recording rules and alerts
Describe the solution that you’d like or the expected outcome
It took me a while to piece together what I needed to do to set up my first recording rule and alert and connect ruler to Mimir's Alertmanager. The information I needed was spread across a number of pages:
- Mimir's ruler component page
- Mimir's Alertmanager component page
- Mimir's configuration reference for ruler
- Mimir's HTTP API reference
- Prometheus' recording rules configuration documentation
- Prometheus' Alertmanager documentation
It'd be great if there was a single page that described what I need to do to set up a recording rule or alert. I'm imagining a guide to creating your first recording rule and alert, but there might be a better way to present this information.
@osg-grafana - Can we please add this to the Docs plan for Mimir? It would be a good guide to develop.
@osg-grafana - Can we please add this to the Docs plan for Mimir? It would be a good guide to develop.
Yes.
@charleskorn Did you figure this out / could you share what you found? I'm trying to add Recording Rules to my Grafana Alloy + Mimir setup, however I don't want to add the Prometheus Operator CRDs for that (if possible).
I can't find any docs on where and how to configure rules such as these - or is this simply not possible and has to be done on e.g. Grafana Alloy's side? In my understanding this is exactly the job of the Ruler Component
The easiest way if you don't want to use Alloy's syncing functionality or the CRD is to use mimirtool to upload the rules to the ruler. Either mimirtool rules load (docs) or mimirtools rules sync (docs) should do what you need.
@charleskorn I want to use the syncing functionality, but dont quite understand it - does it only work with the CRD from the Prometheus Operator? 🤔
mimirtools rules sync is a command line tool that can be run anywhere.
@charleskorn Thanks! :) I finally decided to just use the Prometheus Operator CRDS - however, all of the dashboards have wrong job names (I'm using grafana alloy) and the wrong cluster label set. Any ideas on how to do this with Alloy?