Commit da3f97fa by Gregory Nagy

Naming convention

parent 0dd53d40
...@@ -115,14 +115,14 @@ class Node(TimeStampedModel): ...@@ -115,14 +115,14 @@ class Node(TimeStampedModel):
def get_monitor_info(self): def get_monitor_info(self):
query = Query() query = Query()
handler = GraphiteHandler() handler = GraphiteHandler()
query.setTarget(self.host.hostname + ".circle") query.set_target(self.host.hostname + ".circle")
query.setFormat("json") query.set_format("json")
query.setRelativeStart(5, "minutes") query.set_relative_start(5, "minutes")
metrics = ["cpu.usage", "memory.usage", "network.bytes_sent", metrics = ["cpu.usage", "memory.usage", "network.bytes_sent",
"network.bytes_received"] "network.bytes_received"]
collected = {} collected = {}
for metric in metrics: for metric in metrics:
query.setMetric(metric) query.set_metric(metric)
query.generate() query.generate()
handler.put(query) handler.put(query)
handler.send() handler.send()
......
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