Commit 80243e9a by Gregory Nagy

os env variables changed

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