sematext / sematext-agent-java

Sematext Monitoring Agent
https://sematext.com/spm
Apache License 2.0
23 stars 9 forks source link

SC-4946: Send container id, name and image as tags for application metrics #59

Closed sivasamyk closed 5 years ago

sivasamyk commented 5 years ago

Tested with normal process based install (should not send any of the above tags ) and from STA auto disco. Tested k8s by manually passing the env vars but not in actual k8s setup

Sample output:

The physical hostname is optimus-prime and AA is monitoring ES docker container

tag.alias,token=df372e3b-7e40-4d05-8ca3-b6a8f8905485,container.id=b58e4f3c7ebfa51b585f64b1fcf331e809fb43cdade113a53bd559fd22159684,container.host.hostname=optimus-prime,container.image=docker.elastic.co/elasticsearch/elasticsearch:6.2.4,os.host=optimus-prime,container.name=brave_brahmagupta,jvm=brave_brahmagupta,tag.alias.type=config,container.hostname=172.17.0.2 appType="elasticsearch" 1559814609209000000

jvm,token=df372e3b-7e40-4d05-8ca3-b6a8f8905485,jvm=brave_brahmagupta,es.node.id=JUdHzleNRsWUxVfII2fNqw,container.hostname=172.17.0.2,container.name=brave_brahmagupta,container.host.hostname=optimus-prime,os.host=optimus-prime,container.image=docker.elastic.co/elasticsearch/elasticsearch:6.2.4,es.node=JUdHzle,container.id=b58e4f3c7ebfa51b585f64b1fcf331e809fb43cdade113a53bd559fd22159684 threads.peak=32i,threads=32i,files.open=460i,files.max=1048576i 1559814612238000000

heartbeat,token=df372e3b-7e40-4d05-8ca3-b6a8f8905485,container.id=b58e4f3c7ebfa51b585f64b1fcf331e809fb43cdade113a53bd559fd22159684,container.host.hostname=optimus-prime,container.image=docker.elastic.co/elasticsearch/elasticsearch:6.2.4,os.host=optimus-prime,jvm=brave_brahmagupta,container.name=brave_brahmagupta,container.hostname=172.17.0.2 alive=1i 1559814612238000000