takus / fluent-plugin-ec2-metadata

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

Support ${hostname} placeholder #54

Open chotiwat opened 2 years ago

chotiwat commented 2 years ago

EC2 instances do not always have a Name tag, e.g. EKS worker nodes. When the tag is missing, fluentd logs are spammed by the plugin with [warn]: [filter_ec2_metadata] ec2-metadata: unknown placeholder${tagset_name}found in a tag. This PR exposes the ${hostname} placeholder that we can use instead of the Name tag.