Improve runner managers matching mechanism in dashboards
Most of SaaS Runners dashboards allow to partition graphs by runner manager instances and graphs. By default both limitations can be used: first shard
templating variable limits the list of runner managers, and then runner_manager
templating variable is used as instance=~"${runner_manager:pipe}"
in the metric queries.
That works good for most of the cases, and especially in the ci-runners: Incident Support: *
dashboards, when usually we're interested in specific, short time periods that we use to limit the metrics.
For some ci-runners dashboards - like the business metrics or deployment overview ones - there is no need to filter metrics per single runner manager instance and in fact filtering that on a more general level - by shards - brings much more benefits.
This MR does three things:
- Introduces a unified mechanism for injecting either
instance=~"${runner_manager:pipe}"
orshard=~"${shard:pipe}"
into the PromQL query, - Updates all ci-runners metric queries that were using
instance=~"${runner_manager:pipe}"
to use this unified mechanism (which requires update of some function calls from the dashboard definitions). - Switches
ci-runners: Deployment overview
andci-runners: Business metrics
dashboards to use the newshard=~"${shard:pipe}"
filtering.
As these changes touch most of the ci-runners
dashboards (even if the behavior of the dashboard is not changed at all), I'm linking all of the potentially affected ones below:
URL | Dashboard name |
---|---|
https://dashboards.gitlab.net/dashboard/snapshot/WeY7CfPDpHtlbn0HCOZYz4ZvRy3F65l7 | ci-runners: Business metrics |
https://dashboards.gitlab.net/dashboard/snapshot/iqTjRDK9bIgaPqNZuVZVXw5LYq2piuJe | ci-runners: Deployment overview |
https://dashboards.gitlab.net/dashboard/snapshot/EvaQs2xKdkGJ4ZjHbfdbXrfAHhL04z1q | ci-runners: Incident Support: autoscaling |
https://dashboards.gitlab.net/dashboard/snapshot/zZyXIm8hvaJgA45H6S8gnJM4W0GBmhhR | ci-runners: Incident Support: autoscaling-new |
https://dashboards.gitlab.net/dashboard/snapshot/S9OUZys0ENbU4KoW0fZcjQ6mj9iOeKWE | ci-runners: Incident Support: database |
https://dashboards.gitlab.net/dashboard/snapshot/bkjAwds07EqvZ3HslWjUAV4cPIInYuU6 | ci-runners: Incident Support: gitlab-application |
https://dashboards.gitlab.net/dashboard/snapshot/z2Ef40wRV75gPLma0r8wrhlaJWlDHYR7 | ci-runners: Incident Support: runner-manager |