简体   繁体   中英

Prometheus - Docker/JVM Monitoring

I am planning to use Prometheus for monitoring JVM within the Docker Container. We achieved this with javaagent for JMX exporter. My question is how do I dynamically discover and update my prometheus.yml for scrape targets of JVM to be monitored when I bring up/down a docker container. I am running tomcat within the docker container. Any suggestions?

Thanks in advance and Appreciate your time. Karthik

This depends on how you do service discovery generally. For example if you're using Consul you can use Consul SD in Prometheus to find your exporter, possibly using something like Gliderlab's Registrator. http://www.slideshare.net/brianbrazil/prometheus-and-docker-docker-galway-november-2015 slides 18 and 20 should help point you in the right direction.

Other than Consul, in your situation the other main option would be to use Zookeeper Serverset or get your configuration management to write out yaml/json target files for use by Prometheus.

You may want to take a look at SPM Client docker container. It has the agents for monitoring a number of different applications running in Docker - Elasticsearch, Solr, Tomcat, MySQL, and so on: https://github.com/sematext/docker-spm-client

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM