Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
monitor-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
6aa547f1
authored
Jul 21, 2017
by
Dóbé Péter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
#1
"No Data"
parent
ff377c98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/client.py
+6
-2
No files found.
src/client.py
View file @
6aa547f1
...
...
@@ -8,6 +8,7 @@ import os
import
pika
import
psutil
import
time
import
re
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -28,7 +29,7 @@ class Client:
Constructor of the client class that is responsible for handling the
communication between the graphite server and the data source. In
order to initialize a client you must have the following
environmental var
r
iables:
environmental variables:
- GRAPHITE_SERVER_ADDRESS:
- GRAPHITE_SERVER_PORT:
- GRAPHITE_AMQP_USER:
...
...
@@ -37,7 +38,7 @@ class Client:
- GRAPHITE_AMQP_VHOST:
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
():
value
=
os
.
getenv
(
env_var
,
""
)
if
value
:
...
...
@@ -160,6 +161,9 @@ class Client:
parser
.
add_argument
(
'--memory-size'
,
'-m '
,
type
=
int
)
args
,
unknown
=
parser
.
parse_known_args
(
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
)
if
not
process
or
process
.
cmdline
()
!=
entry
.
cmdline
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment