takus / fluent-plugin-ec2-metadata

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

tagset misdetection -unknown placeholder - for not simple values #51

Open LDevOps opened 4 years ago

LDevOps commented 4 years ago

For a record that does not contain a simple value (i.e. starting with the tagset phrase), the plugin returns no such attribute. Example of configuration fragment:

   <record>
         my_json {"hostname":"${tagset_name}","instance_id":"${instance_id}","instance_type":"${instance_type}"}
    </record>

So they want to get JSON format for the record, it is not possible to use tagset_ (the others like instance_id - not tag - work).

Warn in log:

[warn]: #0 ec2-metadata: unknown placeholder ${tagset_name} found in a tag {...}

I've made a simple proposal to change to #50