From: Laura Flores Date: Tue, 8 Feb 2022 00:45:02 +0000 (+0000) Subject: mgr/telemetry: separate device class usage statistics into their own collection X-Git-Tag: v17.1.0~11^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae3fb978a609a9f5035b3fc45a06f62a63834d83;p=ceph.git mgr/telemetry: separate device class usage statistics into their own collection The new collection is called `basic_usage_by_class`. This info should be separate from `basic_pool_usage` since it doesn't involve pool statistics. Signed-off-by: Laura Flores (cherry picked from commit f69cec5b708ce71083d16d9976cf7e6b20f090d2) --- diff --git a/doc/mgr/telemetry.rst b/doc/mgr/telemetry.rst index e0498e5c326f..dc817e8cf29b 100644 --- a/doc/mgr/telemetry.rst +++ b/doc/mgr/telemetry.rst @@ -187,6 +187,7 @@ List all collections with:: 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 diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 214c475e92a8..116c1ce5d125 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -66,6 +66,7 @@ class Collection(str, enum.Enum): perf_perf = 'perf_perf' basic_mds_metadata = 'basic_mds_metadata' basic_pool_usage = 'basic_pool_usage' + basic_usage_by_class = 'basic_usage_by_class' MODULE_COLLECTION : List[Dict] = [ { @@ -109,6 +110,12 @@ MODULE_COLLECTION : List[Dict] = [ "description": "Default pool application and usage statistics", "channel": "basic", "nag": False + }, + { + "name": Collection.basic_usage_by_class, + "description": "Default device class usage statistics", + "channel": "basic", + "nag": False } ] @@ -1062,8 +1069,8 @@ class Module(MgrModule): 'total_bytes': df['stats']['total_bytes'], 'total_avail_bytes': df['stats']['total_avail_bytes'] } - # basic_pool_usage collection (2/2) - if self.is_enabled_collection(Collection.basic_pool_usage): + # basic_usage_by_class collection + if self.is_enabled_collection(Collection.basic_usage_by_class): report['usage']['stats_by_class'] = {} # type: ignore for device_class in df['stats_by_class']: if device_class in ['hdd', 'ssd', 'nvme']: