Fields that should be sent as tags to InfluxDB (by default only host) need to be in data_points but this is not clear from the documentation:
This does not work:
influxdb {
host => "localhost"
send_as_tags => ["somefield"]
}
Output is logstash VALUE TIME.
This is the correct way:
influxdb {
host => "localhost"
send_as_tags => ["somefield"]
data_points => {
"somefield" => "%{[somefield]}"
}
}
Output: logstash,somefield=SOMEFIELD VALUE TIME
Another way to do this is to set use_event_fields_for_data_points to true (default is false), which will automatically use somefield (and all other non-excluded fields) to InfluxDB