]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: add 'device' channel and call out to devicehealth module
authorSage Weil <sage@redhat.com>
Tue, 2 Jul 2019 14:39:54 +0000 (09:39 -0500)
committerSage Weil <sage@redhat.com>
Tue, 2 Jul 2019 14:39:54 +0000 (09:39 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/devicehealth/module.py
src/pybind/mgr/telemetry/module.py

index 46c748f24beb5618229350a9b3d51d801636b514..fd0e572b4d18d92b117d49287a21770e1d8d7375 100644 (file)
@@ -631,3 +631,7 @@ class Module(MgrModule):
                 return self.remote(plugin_name, 'predict_all_devices')
         except:
             return -1, '', 'unable to invoke diskprediction local or remote plugin'
+
+    def gather_device_report(self):
+        # write me
+        return {}
index 3c8857862c397dc97ce3a25f18d1e1358de671af..757a92d82ece485e815e9352eff8a8301074443e 100644 (file)
@@ -209,6 +209,12 @@ class Module(MgrModule):
             r.append('device')
         return r
 
+    def gather_device_report(self):
+        try:
+            return self.remote('devicehealth', 'gather_device_report')
+        except:
+            return None
+
     def compile_report(self):
         report = {
             'leaderboard': False,
@@ -283,6 +289,9 @@ class Module(MgrModule):
         if self.channel_crash:
             report['crashes'] = self.gather_crashinfo()
 
+        if self.channel_devices:
+            report['devices'] = self.gather_device_report()
+
         return report
 
     def send(self, report):