Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
蜕变的菜鸟
glances
提交
49a579d6
G
glances
项目概览
蜕变的菜鸟
/
glances
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
glances
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
49a579d6
编写于
4月 12, 2015
作者:
N
nicolargo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Correct some PEP on the brand new RabbitMQ export module
上级
e0205a9e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
7 deletion
+15
-7
NEWS
NEWS
+2
-1
conf/glances-test.conf
conf/glances-test.conf
+7
-0
conf/glances.conf
conf/glances.conf
+2
-2
glances/exports/glances_rabbitmq.py
glances/exports/glances_rabbitmq.py
+3
-3
setup.py
setup.py
+1
-1
未找到文件。
NEWS
浏览文件 @
49a579d6
...
...
@@ -10,7 +10,8 @@ Enhancements and news features:
* Grab FAN speed in the Glances sensors plugin (issue #501)
* Allow logical mounts points in the FS plugin (issue #448)
* Add a --disable-hddtemp to disable HDD temperature module at startup (issue #515)
* Add a quiet mode (-q). Can be usefull if you need a Statsd or Influxdb provider only.
* Add a quiet mode (-q). Can be usefull if you need a Statsd or Influxdb provider only
* Add RabbitMQ export module (issue #540 Thk to @Katyucha)
Bugs corrected:
...
...
conf/glances-test.conf
浏览文件 @
49a579d6
...
...
@@ -186,3 +186,10 @@ db=glances
host
=
localhost
port
=
8125
#prefix=glances
[
rabbitmq
]
host
=
localhost
port
=
5672
user
=
guest
password
=
guest
queue
=
glances_queue
conf/glances.conf
浏览文件 @
49a579d6
...
...
@@ -181,6 +181,6 @@ port=8125
[
rabbitmq
]
host
=
localhost
port
=
5672
user
=
g
lances
password
=
g
lances
user
=
g
uest
password
=
g
uest
queue
=
glances_queue
glances/exports/glances_rabbitmq.py
浏览文件 @
49a579d6
...
...
@@ -81,7 +81,7 @@ class Export(GlancesExport):
"""Init the connection to the rabbitmq server"""
if
not
self
.
export_enable
:
return
None
try
:
try
:
parameters
=
pika
.
URLParameters
(
"amqp://"
+
self
.
rabbitmq_user
+
":"
+
self
.
rabbitmq_password
+
"@"
+
self
.
rabbitmq_host
+
":"
+
self
.
rabbitmq_port
+
"/"
)
connection
=
pika
.
BlockingConnection
(
parameters
)
channel
=
connection
.
channel
()
...
...
@@ -97,9 +97,9 @@ class Export(GlancesExport):
if
not
isinstance
(
points
[
i
],
Number
):
continue
else
:
data
+=
", "
+
columns
[
i
]
+
"="
+
str
(
points
[
i
])
data
+=
", "
+
columns
[
i
]
+
"="
+
str
(
points
[
i
])
logger
.
debug
(
data
)
try
:
self
.
client
.
basic_publish
(
exchange
=
''
,
routing_key
=
"glances_queue"
,
body
=
data
)
self
.
client
.
basic_publish
(
exchange
=
''
,
routing_key
=
self
.
rabbitmq_queue
,
body
=
data
)
except
Exception
as
e
:
logger
.
error
(
"Can not export stats to RabbitMQ (%s)"
%
e
)
setup.py
浏览文件 @
49a579d6
...
...
@@ -73,7 +73,7 @@ setup(
'BROWSER'
:
[
'zeroconf>=0.16'
,
'netifaces'
],
'RAID'
:
[
'pymdstat'
],
'DOCKER'
:
[
'docker-py'
],
'EXPORT'
:
[
'influxdb>=1.0.0'
,
'statsd'
],
'EXPORT'
:
[
'influxdb>=1.0.0'
,
'statsd'
,
'pika'
],
'ACTION'
:
[
'pystache'
]
},
packages
=
[
'glances'
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录