Prometheus 监控Docker服务器及Granfanna可视化

cAdvisor(Container Advisor)用于收集正在运行的容器资源使用和性能信息。

使用Prometheus监控cAdvisor

cAdvisor将容器统计信息公开为Prometheus指标。

默认情况下,这些指标在/metrics HTTP端点下提供。

可以通过设置-prometheus_endpoint命令行标志来自定义此端点。

要使用Prometheus监控cAdvisor,只需在Prometheus中配置一个或多个作业,这些作业会在该指标端点处刮取相关的cAdvisor流程。

  • 使用文档:https://github.com/google/cadvisor
  • 图表模板:https://grafana.com/dashboards/193

运行单个cAdvisor来监控整个Docker主机

1、被监控端安装完Docker后,添加启动cAdvisor容器

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

2、修改Promethus监控端配置文件:vim prometheus.yml

scrape_configs:
# 添加作业,自定义名称
- job_name: 'docker'
# 静态添加
static_configs:
# 指定监控实例
- targets: ['47.98.138.176:8080']

3、检查并重新加载配置文件

./promtool check config prometheus.yml
kill -hup PID

4、访问被监控端cAdvisor捕获的数据 :http://47.98.138.176:8080/metrics

5、Prometheus监控端查看是否介入

6、Prometheus监控端查docker数据

查看平均加载cpu10秒:container_cpu_load_average_10s

PromSQL

7、Granfana 导入 Docker 监控图表

  • 推荐图标ID:https://grafana.com/dashboards/193

8、输入导入图标ID等待3秒弹出如下,修改后保存

9、查看图标监控仪表盘

Prometheus 监控Docker服务器及Granfanna可视化的更多相关文章

  1. Prometheus 监控Mysql服务器及Grafana可视化

    Prometheus 监控Mysql服务器及Grafana可视化. mysql_exporter:用于收集MySQL性能信息. 使用版本 mysqld_exporter 0.11.0 官方地址 使用文 ...

  2. Prometheus 监控linux服务器

    Prometheus 监控linux服务器 node_exporter:用于*NIX系统监控,使用Go语言编写的收集器. 使用版本 node_exporter 0.17.0 相关文档 使用文档:htt ...

  3. Prometheus监控Docker Swarm集群(一)

    Prometheus监控Docker Swarm集群(一) cAdvisor简介 为了解决容器的监控问题,Google开发了一款容器监控工具cAdvisor(Container Advisor),它为 ...

  4. Grafana连接Prometheus监控Docker平台

    Grafana是一款开源的分析平台. Grafana allows you to query, visualize, alert on and understand your metrics no m ...

  5. Prometheus入门到放弃(4)之cadvisor监控docker容器

    Prometheus监控docker容器运行状态,我们用到cadvisor服务,cadvisor我们这里也采用docker方式直接运行. 1.下载镜像 [root@prometheus-server ...

  6. prometheus监控(小试牛刀)

    prometheus监控(小试牛刀) 环境:全部服务都是基于docker运行 本文略微草率,好文章在这里,特别好如下: https://www.cnblogs.com/tchua/p/11120228 ...

  7. 6. 使用cadvisor监控docker容器

    Prometheus监控docker容器运行状态,我们用到cadvisor服务,cadvisor我们这里也采用docker方式直接运行.这里我们可以服务端和客户端都使用cadvisor 客户端 1.下 ...

  8. cAdvisor+Prometheus+Grafana监控docker

    cAdvisor+Prometheus+Grafana监控docker 一.cAdvisor(需要监控的主机都要安装) 官方地址:https://github.com/google/cadvisor ...

  9. Prometheus+Grafana 监控 Docker

    cAdvisor (Container Advisor) :用于收集正在运行的容器资源使用和性能信息. https://github.com/google/cadvisor Prometheus(普罗 ...

随机推荐

  1. JavaScript AJAX PHP

    AJAX PHP示例 AJAX用于创建更多交互式应用程序. 以下示例演示了当用户在输入字段中键入字符时,网页如何与Web服务器通信: <!DOCTYPE html> <html> ...

  2. SAP 如何得到交货单上的序列号清单?

    SAP 如何得到交货单上的序列号清单? 以内向交货单为例(外向交货单方法了类似)予以说明. 1)VL33N,在交货单显示界面, 但是没办法通过这个界面里导出序列号清单. 2),只能通过查表的方式导出序 ...

  3. Android培训准备资料之UI一些相似控件和控件一些相似属性之间的区别

    这一篇博客主要收集五大布局中的一些相似控件和控件一些相似属性之间的区别 ImageView ImageButton Button 三者有啥区别? (1)Button继承自TextView,ImageV ...

  4. ngx-echarts 图表数据动态更新

    使用echarts绘制图表时,初次赋值数据正常展示,重新获取数据之后,图表没有跟着动态刷新.解决的办法是: html文件 <div echarts [options]="chartOp ...

  5. Setting up the data and the model

    Table of Contents: Setting up the data and the model Data Preprocessing Weight Initialization Batch ...

  6. node小爬虫

    这一章主利用node的http模块制作一个网页的小爬虫来爬去网页信息,其中对于后端html的节点的获取采用了cheerio模块,这 /** * Created by Administrator on ...

  7. 【转】Spring的IOC原理(通俗易懂)

    1. IoC理论的背景 我们都知道,在采用面向对象方法设计的软件系统中,它的底层实现都是由Ñ个对象组成的,所有的对象通过彼此的合作,最终实现系统的业务逻辑. 如果我们打开机械式手表的后盖,就会看到与上 ...

  8. 【Spring IoC】BeanFactory 和 ApplicationContext(五)

    一.BeanFactory容器 BeanFactory 容器是一个最简单的容器,它主要的功能是为依赖注入 (DI) 提供支持,这个容器接口在 org.springframework.beans.fac ...

  9. django之cookies,session 、中间件及跨站请求伪造

    cookies 和session 为什么会有cookie? ​ 由于http协议是无状态的,即用户访问过后,不留痕迹(状态可以理解为客户端和服务器在某次会话中产生的数据,那无状态的就以为这些数据不会被 ...

  10. hbase链接失败

    https://blog.csdn.net/u010886217/article/details/84444046