【发布时间】:2014-09-04 07:48:15
【问题描述】:
我使用collectd 5.4 以及logstash、elasticsearch 和kibana 在我的Ubuntu 14.04 系统上进行监控。我的collectd 配置文件如下所示:
Hostname "my-host-name"
Interval 1
LoadPlugin cpu
LoadPlugin load
LoadPlugin df
LoadPlugin memory
LoadPlugin swap
LoadPlugin interface
<Plugin interface>
Interface "eth0"
IgnoreSelected false
</Plugin>
LoadPlugin network
<Plugin network>
Server "127.0.0.1" "25826"
</Plugin>
问题是,在我启用 df 插件之前,一切都运行良好。启用df 插件后,memory 插件的输出中缺少type_instance 字段。这是前面提到的输出:
{"@version":"1","@timestamp":"2014-09-04T07:20:42.143Z","host":"my-host","plugin":"memory","collectd_type":"memory","value":6250332160.0}
{"@version":"1","@timestamp":"2014-09-04T07:20:42.143Z","host":"my-host","plugin":"memory","collectd_type":"memory","type_instance":"buffered","value":55103488.0}
{"@version":"1","@timestamp":"2014-09-04T07:20:42.143Z","host":"my-host","plugin":"memory","collectd_type":"memory","type_instance":"cached","value":1283186688.0}
{"@version":"1","@timestamp":"2014-09-04T07:20:42.143Z","host":"my-host","plugin":"memory","collectd_type":"memory","type_instance":"free","value":665567232.0}
查看给定输出的第一行。没有 type_instance 字段。预期的行为是拥有"type_instance":"used"。它只发生在used 字段中,并且随机发生。在我启用 df 插件之前一切正常。
【问题讨论】: