]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: add `basic_pool_options_bluestore` collection 49414/head
authorLaura Flores <lflores@redhat.com>
Thu, 22 Sep 2022 20:50:54 +0000 (20:50 +0000)
committerLaura Flores <ljflores@redhat.com>
Tue, 13 Dec 2022 19:35:43 +0000 (19:35 +0000)
Collects per-pool bluestore options, such as `bluestore_compression_mode`.

Signed-off-by: Laura Flores <lflores@redhat.com>
(cherry picked from commit b0650129e09d91a27768265fce2ff7b1a3e5655f)

doc/mgr/telemetry.rst
src/pybind/mgr/telemetry/module.py

index bed07746d2514f71c97e462ae2e19b1f98f7f79b..388353b84adcfdf6121bec4064896d731760b790 100644 (file)
@@ -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:
 
index f3d49055a5ee3f0206cbd0931753951169a4c5f1..293daa22a0828fead49e19721369141a3c3842fb 100644 (file)
@@ -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