takus / fluent-plugin-ec2-metadata

Fluentd output plugin to add Amazon EC2 metadata into messages
Other
44 stars 28 forks source link

Nested fields #44

Closed igalarzab closed 5 years ago

igalarzab commented 5 years ago

Can this plugin create nested fields, so the ec2 metadata is not spread through the _source, but everything is created inside of a nested object?

This:

{
   "ec2": {
        "ip": "1.2.3.4",
        "az": "eu-west-1"
    }
}

Instead of this:

{
   "ec2_ip":  "1.2.3.4",
   "ec2_az": "eu-west-1"
}

This is the current configuration we have, but it's not nesting the output:

<filter **>
    @type ec2_metadata

    <record>
        ec2.instance_id   ${instance_id}
        ec2.private_ip    ${private_ip}
        ec2.az            ${availability_zone}
    </record>
</filter>

Thanks!

cosmo0920 commented 5 years ago

This feature is not supported.