digitalocean / ceph_exporter

Prometheus exporter that scrapes meta information about a ceph cluster.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ceph_osd_weight metric return REWEIGHT instead of WEIGHT

meons opened this issue · comments

  • on ceph version 0.94.9 (fe6d859066244b97b24f09d46552afc2071e6f90) the metric ceph_osd_crush_weight returns osd WEIGHT value
  • on ceph version 12.2.12 (1436006594665279fe734b4c15d7e08c13ebd777) luminous (stable) the metric ceph_osd_weight returns osd REWEIGHT value

I expect WEIGHT value to be returned so it seems to be a bug.

@meons This is the expected behavior

  • ceph_osd_crush_weight returns the CRUSH weight (i.e. WEIGHT is ceph osd df, adjusted with ceph osd crush reweight XX)
  • ceph_osd_weight return the OSD weight (REWEIGHT in ceph osd df, adjusted with ceph osd reweight XX)

Let me know if I'm missing something from your content but I don't see an issue there

@alram I agree but the problem here is that on ceph 0.94.9 I only have the metric ceph_osd_crush_weight and on ceph 12.2.12 only ceph_osd_weight.

I should have both metrics on both versions or at least one identical metric on both versions...
Is it more clear?

I double checked and I see both (ceph_osd_weight is actually ceph_osd_reweight) in the code on Jewel and Luminous.
On Luminous:

# curl -s localhost:9128/metrics | egrep 'ceph_osd_reweight|ceph_osd_crush_weight' | grep -w osd.90
ceph_osd_crush_weight{cluster="object01",osd="osd.90"} 7.276978
ceph_osd_reweight{cluster="object01",osd="osd.90"} 1

I cannot test Jewel but I do see both values in the code as well. Can you check the logs for any errors?

I just checked on my side and you are right, those metrics are well returned by ceph_exporter on both versions.
My issue should be on prometheus scraping or grafana side. Sorry for the wrong positive, I will close this issue.