Open
Description
Add strategy for pulling a host name from an AWS EC2 instance tag. The tag name can be configurable.
When vitals is initialized, this strategy can pull the current running instance's metadata and grab the assign tag for the host name, and that will become the Vitals reporting host name.
This strategy maps a logically determined host name to a metric, that is not a hostname
or an instance ID.
Getting a name tag (requires awscli):
ec2-describe-tags \
--filter "resource-type=instance" \
--filter "resource-id=$(ec2-metadata -i | cut -d ' ' -f2)" \
--filter "key=Name" | cut -f5
And for reference:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html
Metadata
Metadata
Assignees
Labels
No labels