README.md in fluent-plugin-ec2-metadata-0.0.2 vs README.md in fluent-plugin-ec2-metadata-0.0.3

- old
+ new

@@ -10,15 +10,22 @@ ## Configuration Example: <match foo.**> - type ec2-metadata - output_tag ${instance_id}.${tag} + type ec2_metadata + aws_key_id YOUR_AWS_KEY_ID + aws_sec_key YOUR_AWS_SECRET/KEY + + output_tag ${instance_id}.${tag} <record> - hostname ${instance_id} + hostname ${tagset_name} + instance_id ${instance_id} + instance_type ${instance_type} + az ${availability_zone} + vpc_id ${vpc_id} </record> </match> Assume following input is coming: @@ -28,21 +35,34 @@ then output becomes as below (indented): ```js i-28b5ee77.foo.bar { - "hostname" : "i-28b5ee77", - "message" : "hello ec2!" + "hostname" : "web0001", + "instance_id" : "i-28b5ee77", + "instance_type" : "m1.large", + "az" : "us-west-1b", + "vpc_id" : "vpc-25dab194", + "message" : "hello ec2!" } ``` ### Placeholders -The following placeholders are available: +The following placeholders are always available: -* ${instance_id} instance id * ${tag} input tag * ${tag_parts} input tag splitted by '.'. you can use it like `${tag_parts[0]}` or `${tag_parts[-1]}` +* ${instance_id} instance id +* ${instance_type} instance type +* ${availability_zone} availability zone +* ${region} region + +The followings are available when you define `aws_key_id` and `aws_sec_key`: + +* ${vpc_id} vpc id +* ${subnet_id} subnet id +* ${tagset_xxx} EC2 tag (e.g. tagset_name is replaced by the value of Key = Name) ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)