From 394cbf98e60cb8c4dd7ed1fcd23783307dadf9ad Mon Sep 17 00:00:00 2001 From: Laura Flores Date: Tue, 4 Jan 2022 22:54:33 +0000 Subject: [PATCH] mgr/telemetry: add the rocksdb version number to telemetry Capturing the RocksDB version number in Telemetry would allow us to check that users are using the appropriate RocksDB version for their Ceph cluster. For instance, if a user is working in a Pacific cluster, but their RocksDB version is meant for Nautilus, that might be a problem. It is strucured as "rocksdb_stats" --> "version" in anticipation of more stats that can will be added under "rocksdb_stats". Signed-off-by: Laura Flores --- src/pybind/mgr/telemetry/module.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 57a9fd4ae38..3383516dc3d 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -523,6 +523,16 @@ class Module(MgrModule): def get_stats_per_pg(self) -> dict: return self.get('pg_dump')['pg_stats'] + def get_rocksdb_stats(self) -> Dict[str, str]: + # Initalizers + result: Dict[str, str] = defaultdict() + version = self.get_rocksdb_version() + + # Update result + result['version'] = version + + return result + def gather_crashinfo(self) -> List[Dict[str, str]]: crashlist: List[Dict[str, str]] = list() errno, crashids, err = self.remote('crash', 'ls') @@ -978,6 +988,7 @@ class Module(MgrModule): report['osd_perf_histograms'] = self.get_osd_histograms('separated') report['mempool'] = self.get_mempool('separated') report['heap_stats'] = self.get_heap_stats() + report['rocksdb_stats'] = self.get_rocksdb_stats() # NOTE: We do not include the 'device' channel in this report; it is # sent to a different endpoint. -- 2.39.5