Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Docker monitoring: cAdvisor

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Docker Monitoring: what is cAdvisor cAdvisor?

CAdvisor is an open source Google visualization tool for displaying and analyzing the running status of containers. By running cAdvisor on the host, users can easily get the running statistics of containers on the current host and show them to the users in the form of charts.

Use cAdvisor

To run on this is simple, simply execute the following command

Docker run\-volume=/:/rootfs:ro\-volume=/var/run:/var/run:rw\-volume=/sys:/sys:ro\-volume=/var/lib/docker/:/var/lib/docker:ro\-publish=8080:8080\-detach=true\-name=cadvisor\ google/cadvisor:latest

We can check the running status of the container on the current host by visiting http://localhost:8080

Use skills

CAdvisor is a simple and easy-to-use tool. Compared with using the docker status command, we do not need to log in to the server to see the running status of all containers on the host in the form of a visual chart.

But if we have multiple container hosts, it is impossible for us to log in to the web interface of each machine to view it, which is silly. CAdvisor has thought of this for a long time. It has built-in support for prometheus. We only need to visit http://localhost:8080/metrics to get the output of standard prometheus monitoring samples.

Some monitoring indicators of cAdvisor

Integrate with prometheus-job_name: docker static_configs:-targets: ['192.168.111.65 purl 8088']

After restarting prometheus, we can see that this status is up in the web interface.

Add a chart to grafana

Import 11600 from the page, and you will see the following page

Reference:

Https://github.com/google/cadvisor/blob/master/docs/storage/prometheus.mdhttps://yunlzheng.gitbook.io/prometheus-book/part-ii-prometheus-jin-jie/exporter/commonly-eporter-usage/use-prometheus-monitor-container

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report