Project

General

Profile

Feature #49049

mgr/prometheus: Add pool compression state and pool type to ceph_pool_metadata

Added by Paul Cuzner about 1 month ago. Updated 21 days ago.

Status:
New
Priority:
Normal
Assignee:
Category:
prometheus module
Target version:
% Done:

0%

Source:
Tags:
Backport:
pacific octopus nautilus
Reviewed:
Affected Versions:
Pull request ID:

Description

The pool metadata only provides a pool_id (as a key for matching) and the name of the pool. This feature would add two further labels to the ceph_pool_metadata metric

compression=on or off
type=replica or erasure
scheme=replica2 or ec4+2 etc

NB. this information is already available within the osd_map['pools'] data
options holds the compression info
type reflects replicated(1) and erasure code(3)
size and minsize can be used to determine the scheme

Having this data provide more flexibility to prometheus queries when determining storage efficiency and aggregation.

History

#1 Updated by Paul Cuzner 27 days ago

Looks like scheme is going to be unreliable for EC pools from the data available in the pool metadata output.

This is what some initial code provides
  1. HELP ceph_pool_metadata POOL Metadata
  2. TYPE ceph_pool_metadata untyped
    ceph_pool_metadata{pool_id="1",name="device_health_metrics",type="replicated",compression_active="0"} 1.0
    ceph_pool_metadata{pool_id="2",name="rbd",type="replicated",compression_active="0"} 1.0
    ceph_pool_metadata{pool_id="3",name="iscsi",type="replicated",compression_active="0"} 1.0
    ceph_pool_metadata{pool_id="4",name="compressed",type="replicated",compression_active="1"} 1.0
    ceph_pool_metadata{pool_id="5",name="ecpool",type="erasure",compression_active="0"} 1.0
    ceph_pool_metadata{pool_id="8",name="ecpool41",type="erasure",compression_active="0"} 1.0

#2 Updated by Paul Cuzner 21 days ago

Quick update, I missed the fact the ec data is available in osd_map - so we can provide a simple description of the pool protection scheme.

  1. HELP ceph_pool_metadata POOL Metadata
  2. TYPE ceph_pool_metadata untyped
    ceph_pool_metadata{pool_id="1",name="device_health_metrics",type="replicated",description="replica:3",compression_active="false"} 1.0
    ceph_pool_metadata{pool_id="2",name="testpool",type="replicated",description="replica:3",compression_active="true"} 1.0
    ceph_pool_metadata{pool_id="3",name="my21",type="erasure",description="ec:2+1",compression_active="false"} 1.0

Also available in: Atom PDF