From: Laura Flores Date: Tue, 4 Jan 2022 22:54:33 +0000 (+0000) Subject: mgr/telemetry: add the rocksdb version number to telemetry X-Git-Tag: v17.1.0~91^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43593%2Fhead;p=ceph.git 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 --- 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.