]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: add the rocksdb version number to telemetry 43593/head
authorLaura Flores <lflores@redhat.com>
Tue, 4 Jan 2022 22:54:33 +0000 (22:54 +0000)
committerLaura Flores <lflores@redhat.com>
Tue, 11 Jan 2022 23:04:01 +0000 (23:04 +0000)
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 <lflores@redhat.com>
src/pybind/mgr/telemetry/module.py

index 57a9fd4ae382789f05829e761673cd1869c2f030..3383516dc3db5b681bfebdc6529a23cdbd0a363d 100644 (file)
@@ -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.