I've created a collectd exec plugin with new collectd data types to send to logstash+ES, I get the ES documents but amputated without the new data type fields and wonder why. Hints appreciated, TIA.
new collectd type:
$ grep haproxy /usr/share/collectd/types.db
haproxy_backend quecur:COUNTER:0:4294967295,sescur:COUNTER:0:4294967295,sestot:COUNTER:0:4294967295
I expect collectd picks up it's new type correct as I've logged it's output to csv as well and find new multi value type like these:
epoch,quecur,sescur,sestot
1456412134,0,0,17
1456412144,0,0,17
created from exec plugin by:
PUTVAL /haproxy/haproxy_backend-be-web 1456409997:0:0:107
but I see logstash only receiving this from collectd:
{
"host" => "hapA",
"@timestamp" => "2016-02-25T14:39:32.000Z",
"plugin" => "haproxy",
"collectd_type" => "haproxy_backend",
"type_instance" => "be-web",
"@metadata" => {
"input-collectd" => "true",
"output-esmx" => "true",
"output-stdout" => "false",
"output-debug" => "true",
"esindex" => "collectd"
}
}
Do I need to patch collectd codec somehow to accept new types?
input {
udp {
port => 25826 # 25826 matches port specified in collectd.conf
buffer_size => 8192 # 8192 as we support jumboframes upto 9000
codec => collectd { } # specific Collectd codec to invoke
add_field => {'[@metadata][input-collectd]' => 'true' '[@metadata][output-es
mx]' => 'true' '[@metadata][output-stdout]' => 'false' }
}