Commit 24e2b6aa by Bach Dániel

remove hardcoded graphite hostname

parent 4c340376
...@@ -5,6 +5,8 @@ import pickle ...@@ -5,6 +5,8 @@ import pickle
import logging import logging
import time import time
import struct import struct
from os import getenv
from utils import SerialLineReceiverBase from utils import SerialLineReceiverBase
from agentcelery import agent_started, agent_stopped from agentcelery import agent_started, agent_stopped
...@@ -51,7 +53,9 @@ class SerialLineReceiver(SerialLineReceiverBase): ...@@ -51,7 +53,9 @@ class SerialLineReceiver(SerialLineReceiverBase):
client = GraphiteClientFactory() client = GraphiteClientFactory()
client.protocol.data = data client.protocol.data = data
client.protocol.name = self.factory.vm client.protocol.name = self.factory.vm
reactor.connectTCP('10.7.0.96', 2004, client) reactor.connectTCP(getenv('GRAPHITE_HOST', '127.0.0.1'),
int(getenv('GRAPHITE_PORT', '2004')),
client)
def handle_command(self, command, args): def handle_command(self, command, args):
if command == 'agent_stopped': if command == 'agent_stopped':
......
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