From: Laura Flores Date: Thu, 22 Sep 2022 20:50:54 +0000 (+0000) Subject: mgr/telemetry: add `basic_pool_options_bluestore` collection X-Git-Tag: v17.2.6~127^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4f1b68b33afe16a262b18f405b432087e4ac24bb;p=ceph.git mgr/telemetry: add `basic_pool_options_bluestore` collection Collects per-pool bluestore options, such as `bluestore_compression_mode`. Signed-off-by: Laura Flores (cherry picked from commit b0650129e09d91a27768265fce2ff7b1a3e5655f) --- diff --git a/doc/mgr/telemetry.rst b/doc/mgr/telemetry.rst index bed07746d2514..388353b84adcf 100644 --- a/doc/mgr/telemetry.rst +++ b/doc/mgr/telemetry.rst @@ -183,17 +183,18 @@ List all collections with:: ceph telemetry collection ls - NAME STATUS DESC - basic_base REPORTING Basic information about the cluster (capacity, number and type of daemons, version, etc.) - basic_mds_metadata NOT REPORTING: NOT OPTED-IN MDS metadata - basic_pool_usage NOT REPORTING: NOT OPTED-IN Default pool application and usage statistics - basic_usage_by_class NOT REPORTING: NOT OPTED-IN Default device class usage statistics - crash_base REPORTING Information about daemon crashes (daemon type and version, backtrace, etc.) - device_base REPORTING Information about device health metrics - ident_base NOT REPORTING: CHANNEL ident IS OFF User-provided identifying information about the cluster - perf_memory_metrics NOT REPORTING: NOT OPTED-IN, CHANNEL perf IS OFF Heap stats and mempools for mon and mds - perf_perf NOT REPORTING: NOT OPTED-IN, CHANNEL perf IS OFF Information about performance counters of the cluster - + NAME STATUS DESC + basic_base NOT REPORTING: NOT OPTED-IN Basic information about the cluster (capacity, number and type of daemons, version, etc.) + basic_mds_metadata NOT REPORTING: NOT OPTED-IN MDS metadata + basic_pool_options_bluestore NOT REPORTING: NOT OPTED-IN Per-pool bluestore config options + basic_pool_usage NOT REPORTING: NOT OPTED-IN Default pool application and usage statistics + basic_rook_v01 NOT REPORTING: NOT OPTED-IN Basic Rook deployment data + basic_usage_by_class NOT REPORTING: NOT OPTED-IN Default device class usage statistics + crash_base NOT REPORTING: NOT OPTED-IN Information about daemon crashes (daemon type and version, backtrace, etc.) + device_base NOT REPORTING: NOT OPTED-IN Information about device health metrics + ident_base NOT REPORTING: NOT OPTED-IN, CHANNEL ident IS OFF User-provided identifying information about the cluster + perf_memory_metrics NOT REPORTING: NOT OPTED-IN, CHANNEL perf IS OFF Heap stats and mempools for mon and mds + perf_perf NOT REPORTING: NOT OPTED-IN, CHANNEL perf IS OFF Information about performance counters of the cluster Where: diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index f3d49055a5ee3..293daa22a0828 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -70,6 +70,7 @@ class Collection(str, enum.Enum): basic_usage_by_class = 'basic_usage_by_class' basic_rook_v01 = 'basic_rook_v01' perf_memory_metrics = 'perf_memory_metrics' + basic_pool_options_bluestore = 'basic_pool_options_bluestore' MODULE_COLLECTION : List[Dict] = [ { @@ -132,6 +133,12 @@ MODULE_COLLECTION : List[Dict] = [ "channel": "perf", "nag": False }, + { + "name": Collection.basic_pool_options_bluestore, + "description": "Per-pool bluestore config options", + "channel": "basic", + "nag": False + }, ] ROOK_KEYS_BY_COLLECTION : List[Tuple[str, Collection]] = [ @@ -1086,7 +1093,17 @@ class Module(MgrModule): 'wr': pool_stats['wr'], 'wr_bytes': pool_stats['wr_bytes'] } - + pool_data['options'] = {} + # basic_pool_options_bluestore collection + if self.is_enabled_collection(Collection.basic_pool_options_bluestore): + bluestore_options = ['compression_algorithm', + 'compression_mode', + 'compression_required_ratio', + 'compression_min_blob_size', + 'compression_max_blob_size'] + for option in bluestore_options: + if option in pool['options']: + pool_data['options'][option] = pool['options'][option] cast(List[Dict[str, Any]], report['pools']).append(pool_data) if 'rbd' in pool['application_metadata']: rbd_num_pools += 1