简体   繁体   中英

monitoring memory usage in docker

I am running 1000 docker containers sequentially. Each container instance runs a specific job. After the execution of the job, I kill the container to release resources and run another job within another instance and so on.

I would like to get the memory usage of each container. One value per container expressing the average memory usage.

How is it possible?

May be with prometheus, but I don't know how to use it

May be with prometheus, but I don't know how to use it

Prometheus and Cadvisor is one possibility, I gave a talk earlier in the week with an example doing this using Swarm. See http://www.slideshare.net/brianbrazil/prometheus-and-docker-docker-galway-november-2015

The metrics you're interested in will then be available with the cadvisor job label.

As per your statement, you are running multiple containers and want to scrape each containers memory usage. This can be done with prom query.

Container_memory_in_bytes will give you the complete information about how much memory is used by each container in real time.

Please find the link for setting up the complete monitoring infrastructure. enter link description here

With Promquery you can achieve this.

Hope this answered your question.

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