Cadvisor+prometheus+grafana
部署Cadvisor
[root@localhost ~]# docker run -d \
--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
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
13420a47d9bf google/cadvisor:latest "/usr/bin/cadvisor -…" 10 seconds ago Up 9 seconds 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp cadvisor

prometheus
特点:
- 有多维度的数据模型
- 有自己的查询语言:PromQL
- 不依赖分布式存储
- 支持通过中间网关推送时间序列数据
- 通过服务发现或静态配置,来发现目标服务对象
- 支持图标和界面展示
部署Prometheus
[root@localhost ~]# docker pull prom/Prometheus //下载普罗米修斯
[root@localhost ~]# vim /tmp/prometheus.yml //创建静态普罗米修斯yml文件
#my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrap_timeout is set to the global default (10s).
# Alertmanager configuration
Alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
#Load rules once andpreiodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scrapedfrom this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: 'docker' ##定义一个叫docker的组
static_configs:
- targets: ['192.168.200.14:8080']
[root@localhost ~]# docker run -d --name=prometheus -p 9090:9090 -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml -v /etc/localtime:/etc/localtime prom/prometheus
页面访问端口9090

部署Granafa
[root@localhost ~]# docker run -d --name=granafa -p 3000:3000 grafana/grafana
65f2b78f0d30a27d38e12d728db66a60d9f44fc2ad2ab3ac3fd58c4cb7afd4f6
[root@localhost ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
65f2b78f0d30 grafana/grafana "/run.sh" 9 seconds ago Up 8 seconds 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp granafa
dd61dd779dae prom/prometheus "/bin/prometheus --c…" 8 minutes ago Up 4 minutes 0.0.0.0:9090->9090/tcp, :::9090->9090/tcp prometheus
13420a47d9bf google/cadvisor:latest "/usr/bin/cadvisor -…" 46 minutes ago Up 46 minutes 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp cadvisor




Cadvisor+prometheus+grafana的更多相关文章
- cAdvisor+Prometheus+Grafana监控docker
cAdvisor+Prometheus+Grafana监控docker 一.cAdvisor(需要监控的主机都要安装) 官方地址:https://github.com/google/cadvisor ...
- k8s集群监控 cadvisor/exporter+prometheus+grafana
### k8s监控处理 ### 1.cadvisor/exporter+prometheus+grafana 安装#### 1.1 配置nfs安装```shellubuntu: nfs 服务器 apt ...
- 7、Docker监控方案(cAdvisor+InfluxDB+Grafana)
一.组件介绍 我们采用现在比较流行的cAdvisor+InfluxDB+Grafana组合进行Docker监控. 1.cAdvisor(数据采集) 开源软件cAdvisor(Container Adv ...
- (原)ubuntu下cadvisor+influxdb+grafana+supervisord监控主机和docker的containers
ubuntu下cadvisor+influxdb+grafana+supervisord监控主机和docker的containers(运行在主机上) 适用于类ubuntu系统.amd64. 1. in ...
- docker容器监控:cadvisor+influxdb+grafana
cadvisor+influxdb+grafana可以实现容器信息获取.存储.显示等容器监控功能,是目前流行的docker监控开源方案. 方案介绍 cadvisor Google开源的用于监控基础设施 ...
- docker监控方案实践(cadvisor+influxdb+grafana)
一.概要 1.1 背景 虚拟化技术如今已经非常热门,如果你不知道什么是虚拟化,那你应该了解虚拟机.虚拟化技术如同虚拟机一样,用于将某些硬件通过软件方式实现"复制",虚拟出" ...
- 050.集群管理-Prometheus+Grafana监控方案
一 Prometheus概述 1.1 Prometheus简介 Prometheus是由SoundCloud公司开发的开源监控系统,是继Kubernetes之后CNCF第2个毕业的项目,在容器和微服务 ...
- Prometheus+Grafana 监控 Docker
cAdvisor (Container Advisor) :用于收集正在运行的容器资源使用和性能信息. https://github.com/google/cadvisor Prometheus(普罗 ...
- 部署Prometheus+Grafana监控
Prometheus 1.不是很友好,各种配置都手写 2.对docker和k8s监控有成熟解决方案 Prometheus(普罗米修斯) 是一个最初在SoudCloud上构建的监控系统,开源项目,拥有非 ...
- Prometheus+Grafana+Alertmanager实现告警推送教程 ----- 图文详解
前言 本文主要介绍的是Prometheus采集数据,通过Grafana加上PromQL语句实现数据可视化以及通过Alertmanage实现告警推送功能.温馨提示,本篇文章特长,2w多的文字加上几十张图 ...
随机推荐
- [前端js] 爬取亿图脑图大纲
这段程序使看到了好的东西,又没有零钱的产物 还是老师让画思维导图我不想画还想白嫖的想法 用时20分钟 就拿这个来作为例子 https://mm.edrawsoft.cn/template/286842 ...
- 关于JWT的.net 使用(简单明了直接代码)
首先第一步:下载插件! 在ui层---控制器所在层添加一个类 然后复制如下 using Microsoft.Extensions.Configuration; using Microsoft.Iden ...
- 前端之Vue day08 Vue3项目搭建、setup、toRefs
一.Vue3 介绍 # 新项目使用vue3,有部分老项目使用vue2 # vue3 的变化 1.性能的提升 -打包大小减少41% -初次渲染快55%, 更新渲染快133% -内存减少54% 2.源码的 ...
- Spring不同版本的AOP
1.Spring4.SpringBoot1 1.1 代码实现 public interface Calculator { int div(int a,int b); } @Component publ ...
- PHP 静态延迟绑定 static
PHP (self static parent 区别) self调用的方法和属性始终表示当前类的方法和属性 static调用的方法和属性为当前执行的类的方法和属性 parent调用的方法和属性为父类的 ...
- PHY6230 高性价比低功耗高性能 集成32-bit MCU BLE5.2+2.4G芯片
PHY6230 是一款高性价比低功耗高性能Bluetooth LE 5.2系统级芯片,集成32-bit高性能低功耗MCU,16KB OTP,8KB Retention SRAM和64KB ROM,可选 ...
- uniapp 配置钉钉小程序package.json文件
{ "uni-app": { "scripts": { "mp-dingtalk": { "title": " ...
- dbeaver把表数据导出csv时字符串自动加双引号问题解决
背景: mysql 5.7 dbeaver 21.1.4 解决:如下图,括起字符这里设置一个 空格(space)即可: 参考1
- logback-spring.xml配置说明
logback-spring.xml的配置说明 <?xml version="1.0" encoding="UTF-8"?> <configu ...
- clear_buff-cache.sh
#! /bin/bash sync;echo 1 > /proc/sys/vm/drop_caches # 表示清除pagecache sync;echo 2 > /proc/sys/vm ...