Skip to content

Documentation should state that tags need to be defined in data_points as well #36

@jessetan

Description

@jessetan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions