Oct 18, 2024

Contributors

Configuration as code for dashboards and check rules

Managing dashboard configurations and check rules manually can become a huge burden. Now you can take back control over both of these with the Dash0 API or with the Dash0 Kubernetes operator.

Dashboards are a very powerful tool to see all the telemetry for your specific use cases on one screen. Check rules are indispensable to get alerted when conditions in your system require human intervention.

Editing a dashboard or a check rule via Dash0's UI is probably the best way to get fast feedback, and iterate quickly. However, if you have a lot of dashboards or checks, at some point you might want to go with a more systematic approach. Configuration as code is the way to go.

The Dash0 Kubernetes operator now supports managing dashboards as well as check rules. Simply deploy them as Kubernetes resources, the Dash0 operator will automatically pick them up and synchronize them with your dashboards and check rules in Dash0. Additionally, you can also directly manage them via Dash0's API, if you want to do so from your CI system or via scripting.

Last but not least, Dash0 is committed to open standards. For dashboards, we use the emerging CNCF standard Perses, and for check rules we use the Prometheus rules custom resource definition. This enables you to build your dashboards and check rules with zero vendor lock-in.

You can read more about this feature here.

A Dash0 dashboard

Here is an example for a Perses dashboard Kubernetes resource: https://github.com/dash0hq/dash0-operator/blob/main/test-resources/customresources/persesdashboard/persesdashboard.yaml

Now adding a fully configured Perses dashboard to Dash0 becomes as easy as executing the following one-liner:

sh
0
kubectl apply -f persesdashboard.yaml

And here is how a Kubernetes resource for check rules looks like: https://github.com/dash0hq/dash0-operator/blob/main/test-resources/customresources/prometheusrule/prometheusrule.yaml

To deploy this to your cluster and have the Dash0 Kubernetes operator create the corresponding check rules:

sh
01
kubectl apply -f prometheusrule.yaml