Feature #62966
openAdd metric for providing OSD fragmentation level
0%
Description
Create a metric providing the OSD fragmentation level is useful for any kind of Ceph Users.
We have a socket command to obtain this value, but a metric will allow us to define also automatic alerts which can be very useful helping to keep the cluster in healthy and performance conditions.
The command used for obtain the OSD fragmentation level is:
ceph daemon osd.ID bluestore allocator score block:
It returns the OSD fragmentation level, a number between 0 (perfect) and 1(horrible).
The metric cannot be produced as perf counter directly from the OSD daemon, because it will require a high consumption of resources for an information that does not require a high frequency. Probably it will be useful to query only1 time by day.
The next "best place" to produce the metric is the Ceph exporter. This is because scalability, compatibility (metric will be available in baremetal/k8s clusters), and flexibility to implement (we can use cache to avoid to query more thatn one time by day the OSDs..., etc ).