]> 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, 17 Jul 2018 20:29:00 +0000 (22:29 +0200)
This was forgotten during the previous patches.

Signed-off-by: Boris Ranto <branto@redhat.com>
src/pybind/mgr/prometheus/module.py

index 4aa8be6a6979b9301665ff657f10e9ea6ea42333..f0982b17ec1657f4760a37165544f3fb9ff4ea15 100644 (file)
@@ -643,6 +643,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