Commit aae5f918 by Gregory Nagy

client.py: the client will not send metrics report if no metric is collected in that beat

parent bd5fb513
......@@ -208,8 +208,9 @@ class Client:
metrics = nodeMetrics + vmMetrics
if self.debugMode == "True":
print(metrics)
if self.__send(metrics) is False:
raise RuntimeError
if len(metrics) is not 0:
if self.__send(metrics) is False:
raise RuntimeError
time.sleep(1)
self.beat = self.beat + 1
if ((self.beat % (maxFrequency + 1)) is 0):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment