我使用collectd 5.4
以及logstash
,elasticsearch
和kibana
用於我的Ubuntu 14.04系統上的監視目的。我collectd
配置文件看起來像這樣:Collectd - 隨機丟失'type_instance'字段
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
插件everyhing工作完全正常。啓用了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
插件。