]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
prometheus: Reset the time the data was captured
authorBoris Ranto <branto@redhat.com>
Tue, 17 Jul 2018 13:59:20 +0000 (15:59 +0200)
committerBoris Ranto <branto@redhat.com>
Tue, 24 Jul 2018 19:41:47 +0000 (21:41 +0200)
This was forgotten during the previous patches.

Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 83565c34830a64cb7887984396c8b9aeb9644bc1)

src/pybind/mgr/prometheus/module.py

index 381af8c6de1a85efef77c73ab8bacc59d595b000..e016a990a1355d49000cba03f2e4e547fa543f8a 100644 (file)
@@ -675,6 +675,8 @@ class Module(MgrModule):
                     return instance.collect_cache
 
                 if instance.have_mon_connection():
+                    instance.collect_cache = None
+                    instance.collect_time = time.time()
                     instance.collect_cache = instance.collect()
                     cherrypy.response.headers['Content-Type'] = 'text/plain'
                     return instance.collect_cache