]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: add 'last_upload' to status 33125/head
authorYaarit Hatuka <yaarit@redhat.com>
Fri, 7 Feb 2020 15:04:50 +0000 (10:04 -0500)
committerYaarit Hatuka <yaarit@redhat.com>
Sun, 9 Feb 2020 21:59:41 +0000 (16:59 -0500)
'ceph telemetry status' now shows the last sent report date.

Fixes: https://tracker.ceph.com/issues/44040
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
src/pybind/mgr/telemetry/module.py

index e519bd7530e588a61189b1649f1ba726d63a6bf5..d02a62a56514d324b5221a0cd2b62cd051fdc66d 100644 (file)
@@ -742,6 +742,7 @@ class Module(MgrModule):
             r = {}
             for opt in self.MODULE_OPTIONS:
                 r[opt['name']] = getattr(self, opt['name'])
+            r['last_upload'] = time.ctime(self.last_upload) if self.last_upload else self.last_upload
             return 0, json.dumps(r, indent=4, sort_keys=True), ''
         elif command['prefix'] == 'telemetry on':
             if command.get('license') != LICENSE: