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
Commit
bd4f4576
authored
Nov 05, 2013
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: adding virtual_host option
parent
d0d3b6be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
src/client.py
+2
-0
src/cnfparse.py
+1
-0
No files found.
src/client.py
View file @
bd4f4576
...
@@ -22,6 +22,7 @@ class Client:
...
@@ -22,6 +22,7 @@ class Client:
self
.
amqp_user
=
str
(
config
[
"amqp_user"
])
self
.
amqp_user
=
str
(
config
[
"amqp_user"
])
self
.
amqp_pass
=
str
(
config
[
"amqp_pass"
])
self
.
amqp_pass
=
str
(
config
[
"amqp_pass"
])
self
.
amqp_queue
=
str
(
config
[
"amqp_queue"
])
self
.
amqp_queue
=
str
(
config
[
"amqp_queue"
])
self
.
amqp_virtual_host
=
str
(
config
[
"amqp_virtual_host"
])
def
__connect
(
self
):
def
__connect
(
self
):
"""
"""
...
@@ -33,6 +34,7 @@ class Client:
...
@@ -33,6 +34,7 @@ class Client:
self
.
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
self
.
connection
=
pika
.
BlockingConnection
(
pika
.
ConnectionParameters
(
host
=
self
.
server_address
,
host
=
self
.
server_address
,
port
=
self
.
server_port
,
port
=
self
.
server_port
,
virtual_host
=
self
.
amqp_virtual_host
,
credentials
=
credentials
credentials
=
credentials
)
)
)
)
...
...
src/cnfparse.py
View file @
bd4f4576
...
@@ -13,6 +13,7 @@ def importConf(path_to_file):
...
@@ -13,6 +13,7 @@ def importConf(path_to_file):
params
[
"amqp_queue"
]
=
config
.
get
(
"AMQP"
,
"Queue"
)
params
[
"amqp_queue"
]
=
config
.
get
(
"AMQP"
,
"Queue"
)
params
[
"amqp_user"
]
=
config
.
get
(
"AMQP"
,
"User"
)
params
[
"amqp_user"
]
=
config
.
get
(
"AMQP"
,
"User"
)
params
[
"amqp_pass"
]
=
config
.
get
(
"AMQP"
,
"Pass"
)
params
[
"amqp_pass"
]
=
config
.
get
(
"AMQP"
,
"Pass"
)
params
[
"amqp_virtual_host"
]
=
config
.
get
(
"AMQP"
,
"Vhost"
)
metrics
[
"cpu.usage"
]
=
config
.
get
(
"Metrics"
,
"cpuUsage"
)
metrics
[
"cpu.usage"
]
=
config
.
get
(
"Metrics"
,
"cpuUsage"
)
metrics
[
"memory.usage"
]
=
config
.
get
(
"Metrics"
,
"memoryUsage"
)
metrics
[
"memory.usage"
]
=
config
.
get
(
"Metrics"
,
"memoryUsage"
)
metrics
[
"user.count"
]
=
config
.
get
(
"Metrics"
,
"userCount"
)
metrics
[
"user.count"
]
=
config
.
get
(
"Metrics"
,
"userCount"
)
...
...
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