Commit 80243e9a by Gregory Nagy

os env variables changed

parent baacc263
......@@ -5,12 +5,12 @@ import os
class GraphiteHandler:
def __init__(self):
if os.getenv("NODE_MONITOR_SERVER") is "":
if os.getenv("GRAPHITE_SERVER") is "":
raise RuntimeError
self.__server_name = os.getenv("NODE_MONITOR_SERVER")
if os.getenv("NODE_MONITOR_PORT") is "":
self.__server_name = os.getenv("GRAPHITE_SERVER")
if os.getenv("GRAPHITE_PORT") is "":
raise RuntimeError
self.__server_port = os.getenv("NODE_MONITOR_PORT")
self.__server_port = os.getenv("GRAPHITE_PORT")
self.__queries = []
self.__responses = []
......
......@@ -127,7 +127,7 @@ class Node(TimeStampedModel):
handler.put(query)
handler.send()
for metric in metrics:
response = query.pop()
response = handler.pop()
length = len(response[0]["datapoints"])
cache = response[0]["datapoints"][length - 1][0]
if cache is None:
......
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