I have a graph for the metric ceph_pool_bytes_used that
returns the following data
ceph_pool_raw_bytes_used{pool_id="2"} 471882268672.0
ceph_pool_raw_bytes_used{pool_id="0"} 0.0
ceph_pool_raw_bytes_used{pool_id="3"} 3339.0
Grafana's legend is identifying one of the lines like this.
I'd like to rewrite that to instead be the real name of the pool.
I can get a mapping of the pool_id to pool name with by querying
ceph_pool_metadata
ceph_pool_metadata{pool_id="0",name="rbd"} 0.0
ceph_pool_metadata{pool_id="3",name=".rgw.root"} 0.0
ceph_pool_metadata{pool_id="2",name="pool-kubernetes"} 0.0
I'm unclear though how I actually do the substitution though.
With an influxdb backend its very straight forward and grafana has
some nice query assembler that makes it very easy.
Is an attempt from copying things off of the internet, but it does
not seem to work correctly.
(ceph_pool_bytes_used) *on (pool_id)
group_left(name)(ceph_pool_metadata)
-- Brandon Pinske Site Reliability Engineer www.rabb.it