我想使用this模块从我们的Rabbitmq服务器收集数据并将其发送到我们的石墨服务器,然后将其显示在grafana中。
我的问题是,一切都到达了石墨,但是rabbitmq却没有。
我是否必须在grafana或石墨上配置某些东西才能从python模块收集数据?
这是我正在使用的配置:
FQDNLookup false
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
PluginDir "/usr/lib64/collectd"
TypesDB "/usr/share/collectd/types.db"
AutoLoadPlugin true
Interval 10
Timeout 2
ReadThreads 5
WriteThreads 5
WriteQueueLimitHigh 1000000
WriteQueueLimitLow 800000
<LoadPlugin python>
Globals true
</LoadPlugin>
<Plugin python>
LogTraces true
Interactive false
Import "collectd_rabbitmq.collectd_plugin"
<Module "collectd_rabbitmq.collectd_plugin">
Username "admin"
Password "rabbitmqadmin"
Realm "RabbitMQ Management"
Host "localhost"
Port "15672"
</Module>
</Plugin>
Include "/etc/collectd.d"
这是石墨模块,用于将日志发送到collectd.d目录中:
LoadPlugin write_graphite
<Plugin write_graphite>
<Node "graphteserver.local">
Host "graphiteserver.local"
Port "2003"
Protocol "tcp"
LogSendErrors true
Prefix "collectd."
#Postfix "collectd"
StoreRates true
AlwaysAppendDS false
EscapeCharacter "_"
SeparateInstances true
</Node>
</Plugin>
我没有粘贴一般的收集模块,但是这些到达了石墨低语目录:
total 240
drwxr-xr-x 14 carbon carbon 4096 Sep 14 00:05 .
drwxr-xr-x 4446 carbon carbon 188416 Sep 14 15:28 ..
drwxr-xr-x 5 carbon carbon 4096 Sep 14 00:05 aggregation
drwxr-xr-x 6 carbon carbon 4096 Sep 14 00:05 cpu
drwxr-xr-x 4 carbon carbon 4096 Sep 14 00:05 df
drwxr-xr-x 7 carbon carbon 4096 Sep 14 00:05 disk
drwxr-xr-x 3 carbon carbon 4096 Sep 14 00:05 interface
drwxr-xr-x 3 carbon carbon 4096 Sep 14 00:05 irq
drwxr-xr-x 3 carbon carbon 4096 Sep 14 00:05 load
drwxr-xr-x 12 carbon carbon 4096 Sep 14 00:06 memcached
drwxr-xr-x 4 carbon carbon 4096 Sep 14 00:05 memory
drwxr-xr-x 5 carbon carbon 4096 Sep 14 00:05 ntpd
drwxr-xr-x 36 carbon carbon 4096 Sep 14 00:05 processes
drwxr-xr-x 4 carbon carbon 4096 Sep 14 00:05 swap
在收集的日志中,我现在没有任何错误,这是重启后的最后几行:
[2018-09-14 13:51:02] [info] Exiting normally.
[2018-09-14 13:51:02] [info] collectd: Stopping 5 read threads.
[2018-09-14 13:51:02] [info] collectd: Stopping 5 write threads.
[2018-09-14 13:51:02] [warning] Plugin `df' did not register for value `ReportReserved'.
[2018-09-14 13:51:02] [warning] supervised by systemd, will signal readyness
[2018-09-14 13:51:02] [info] Initialization complete, entering read-loop.
[2018-09-14 13:52:04] [warning] Plugin `df' did not register for value `ReportReserved'.
[2018-09-14 13:55:44] [info] Exiting normally.
[2018-09-14 13:55:44] [info] collectd: Stopping 5 read threads.
[2018-09-14 13:55:44] [info] collectd: Stopping 5 write threads.
[2018-09-14 13:55:44] [warning] Plugin `df' did not register for value `ReportReserved'.
[2018-09-14 13:55:44] [warning] supervised by systemd, will signal readyness
[2018-09-14 13:55:44] [info] Initialization complete, entering read-loop.
[2018-09-14 15:11:46] [warning] Plugin `df' did not register for value `ReportReserved'.
[2018-09-14 15:14:16] [info] Exiting normally.
[2018-09-14 15:14:16] [info] collectd: Stopping 5 read threads.
[2018-09-14 15:14:16] [info] collectd: Stopping 5 write threads.
[2018-09-14 15:14:16] [warning] Plugin `df' did not register for value `ReportReserved'.
[2018-09-14 15:14:16] [warning] supervised by systemd, will signal readyness
[2018-09-14 15:14:16] [info] Initialization complete, entering read-loop.
我需要配置什么,或者应该如何查看此模块化指标?在石墨上的python目录下还是在哪里?