Commit 6aa547f1 by Dóbé Péter

Fix #1 "No Data"

parent ff377c98
...@@ -8,6 +8,7 @@ import os ...@@ -8,6 +8,7 @@ import os
import pika import pika
import psutil import psutil
import time import time
import re
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -28,7 +29,7 @@ class Client: ...@@ -28,7 +29,7 @@ class Client:
Constructor of the client class that is responsible for handling the Constructor of the client class that is responsible for handling the
communication between the graphite server and the data source. In communication between the graphite server and the data source. In
order to initialize a client you must have the following order to initialize a client you must have the following
environmental varriables: environmental variables:
- GRAPHITE_SERVER_ADDRESS: - GRAPHITE_SERVER_ADDRESS:
- GRAPHITE_SERVER_PORT: - GRAPHITE_SERVER_PORT:
- GRAPHITE_AMQP_USER: - GRAPHITE_AMQP_USER:
...@@ -37,7 +38,7 @@ class Client: ...@@ -37,7 +38,7 @@ class Client:
- GRAPHITE_AMQP_VHOST: - GRAPHITE_AMQP_VHOST:
Missing only one of these variables will cause the client not to work. Missing only one of these variables will cause the client not to work.
""" """
self.name = 'circle.%s' % gethostname() self.name = 'circle.%s' % gethostname().split(".")[0]
for var, env_var in self.env_config.items(): for var, env_var in self.env_config.items():
value = os.getenv(env_var, "") value = os.getenv(env_var, "")
if value: if value:
...@@ -160,6 +161,9 @@ class Client: ...@@ -160,6 +161,9 @@ class Client:
parser.add_argument('--memory-size', '-m ', type=int) parser.add_argument('--memory-size', '-m ', type=int)
args, unknown = parser.parse_known_args( args, unknown = parser.parse_known_args(
entry.cmdline()[1:]) entry.cmdline()[1:])
# for Red Hat style parametering of kvm
args.name = re.sub(r"^guest=", "", args.name)
args.name = re.sub(r",debug-threads=.*$", "", args.name)
process = self.processes.get(entry.pid, None) process = self.processes.get(entry.pid, None)
if not process or process.cmdline() != entry.cmdline(): if not process or process.cmdline() != entry.cmdline():
......
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