架构师_程序员_码农网

Retrieve password
Register

QQ登录

Just one step to get started

Search
View:3122|Reply: 1
打印 上一主题 下一主题

Collecting Docker Container Metrics with cAdvisor

[Copy link]
cAdvisor.cAdvisor
跳转到指定楼层
owner
发表于 2022-1-25 10:32:09| 看该作者回帖奖励|ReverseBrowse|Read Mode
Requirement: Check the status of a docker container, collect various container metrics, search for "container_exporter", found: https: //github.com/docker-archive/infra-container_ We found that exporter has been deprecated, and we recommend using "cAdvisor".

cAdvisor (Container Advisor)

GitHub address: https: //github.com/google/cadvisor

Documentation: https: //github.com/google/cadvisor/blob/master/docs/running.md

cAdvisor (Container Advisor) lets container users understand the resource usage and performance characteristics of the containers they are running. It is a running daemon that collects, aggregates, processes, and exports information about running containers. Specifically, it saves resource isolation parameters, historical resource usage, histograms of complete historical resource usage, and network statistics for each container. This data is exported container- and machine-wide.

The Docker Direct View Container Resource Consumption command is as follows:


The Docker command to view the disk usage information of the service directly is as follows:

The environment I'm using is as follows:

  • Docker version 20.10.10
  • CentOS 7 64-bit

[root@itsvse-doc ~]# docker version
Client: Docker Engine - Community
Version: 20.10.10
API version: 1.41
Go version: go1.16.9
Git commit: b485636
Built: Mon Oct 25 07:44:50 2021
OS/Arch: linux/amd64
Context: default
Experimental: true

Server: Docker Engine - Community
Server: Docker Engine - Community
Version: 20.10.10
API version: 1.41 (minimum version 1.12)
Go version: go1.16.9
Git commit: e2f740d
Built: Mon Oct 25 07:43:13 2021
OS/Arch: linux/amd64
Experimental: false
containerd.
Version: 1.4.11
GitCommit: 5b46e404f6b9f661a205e28d59c982d3634148f8
runc.
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
runc: Version: 1.0.2 GitCommit: v1.0.2-0-g52b36a2
Version: 0.19.0
GitCommit: de40ad0

Run cAdvisor

The command is the following for CentOS 7, for example:


Try using your browser to access: http: //192.168.1.213:8085/ as shown below:



Monitoring cAdvisor with Prometheus

Recap:

Grafana+Prometheus+Node Exporter Getting Linux Server Metrics
h ttps:// www.itsvse.com/thread-9971-1-1.html

Grafana+Prometheus+Windows Exporter Monitoring Service Performance Metrics
h ttps:// www.itsvse.com/thread-9671-1-1.html

Try visiting: http: //192.168.1.213:8085/metrics as shown below:



Documentation: https: //github.com/google/cadvisor/blob/master/docs/storage/prometheus.md

Grafana dashboard address: https: //github.com/vegasbrianc/grafana_dashboard


The prometheus.yml configuration is as follows:

Restart the prometheus service to get the docker run metrics.

Import the dashboard using grafana and run it for a few minutes as shown below:






Previous article:CentOS 7 install MySQL database using rpm method
Next article:Spring Boot MessageSource internationalization language pitfalls
The code farmer network, only published in the process of practice, encountered technical difficulties, do not mislead others.
I 'm not sure what I'm talking about.
sofabed
owner|Posted on 2022-1-25 13:25:54|Only see this author
h ttps:// grafana.com/grafana/dashboards/893


The code farmer network, only published in the process of practice, encountered technical difficulties, do not mislead others.
You need to log in before you can post back Log in | Register

This version of the integral rules

DISCLAIMER:
All software, programming materials or articles published on the website are only for learning and research purposes; they shall not be used for commercial or illegal purposes, otherwise, all the consequences shall be borne by the users. This site information from the network, copyright dispute has nothing to do with this site. You must completely remove the above content from your computer within 24 hours of downloading. If you like the program, please support the genuine software, buy registration and get better genuine service. If there is any infringement, please contact us by email to deal with it.

Mail To:help@itsvse.com

QQ| ( ICP备14021824号-2 )|Sitemap

GMT+8, 2024-9-19 04:08

Quick ReplyBack to topBack to list