]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/prometheus: Add instance_id metadata for rgw
authorBenoît Knecht <bknecht@protonmail.ch>
Fri, 12 Nov 2021 14:10:52 +0000 (15:10 +0100)
committerErnesto Puerta <epuertat@redhat.com>
Wed, 9 Feb 2022 19:48:51 +0000 (20:48 +0100)
commit5441b8d29ce8e5e52634d98eef34ffb1e583c0c5
tree97b3da8c6426e137b9184f6713d9867e21d9b25a
parentd924cf66cca5c119ae0549e97b61bb3b3f049245
pybind/mgr/prometheus: Add instance_id metadata for rgw

In order to get the `ceph_daemon` label for `rgw` metrics corresponding to the
value before #40220, we need to add the `instance_id` label to the
`ceph_rgw_metadata` metric.

This way, the old `ceph_daemon` label can be added to any `ceph_rgw_*` metric
using the following PromQL query, for instance:

```
ceph_rgw_req * on (instance_id) group_left(ceph_daemon) ceph_rgw_metadata
```

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
(cherry picked from commit 01b42c1c51a1b4142adcde0c2c673b60e61e4697)
src/pybind/mgr/prometheus/module.py