Closed otisg closed 9 years ago
Also, if one is running in AWS, it would be good to grab instance (container?) tags via http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
It's implemented in https://github.com/sematext/spm-agent (spm-agent@1.27.0) - so Docker and Node.js agents support tags now:
export SPM_MONITOR_TAGS="role:webfrontend,project:redplanet"
In Docker Agent (after next image build)
docker run -e SPM_MONITOR_TAGS="role:webfrontend,project:redplanet" ...
If one likes to tag the hosts with Amazon Metadata:
docker run -e SPM_MONITOR_TAGS="security:$(curl http://169.254.169.254/latest/meta-data/security-groups)" ...
In Node.js Agent Beside using the env. variable SPM_MONITOR_TAGS it is possible to use an entry in spmagentrc (see https://github.com/sematext/spm-agent-nodejs):
SPM_MONITOR_TAGS = role:webfrontend,project:redplanet
SPM has/is getting support for tags. Could we add support for that, say by passing in something like -e TAGS="foo,bar", or -e TAGS="env:prod". Or maybe better at Node.js monitor level?