Need Help to Pass Host and App Name to Docker Metrics

telegraf
#1

Hi All,

I am using telegraf version 1.1.2 to populate docker metrics to InfluxDB. Its all working fine. But I need more narrow data on Host IP Address and Application Name within the Container attached to all the docker metrics. How do I achieve it? Any help here is appreciated.

Thanks all

Regards
Karthik

#2

@kpalanivelu Can you specify if you are running telegraf in a container? Also where do you expect to pull the hostIP and application data from? Are they specified at host level or at container level?

#3

Hi, telegraf runs within the container. I am sourcing as environment variables for the container. For JVM Metrics I have parameters such as name and host. I am looking for something similar to populate the IP and name of application for all the metrics.

#4

@kpalanivelu Can you specify which telegraf plugin you would like the application and IP to be appended to? Can you use the global_tags to add this? Where on the host would you pull the IP or application from?

#5

@jackzampolin I am using docker plugin to post the docker metrics. I will be having a environment variable using -e on container level or can use a replace function to update the IP and Application name at the time of Container startup. But It would be helpful if I have this information for the data display.

#6

@jackzampolin Please let me know how to use the global tags…will this data embed into all metric data we post?

#7

@jackzampolin Global Tags worked. Thank you for your time.