当前位置: 首页 > article >正文

docker 部署prometheus和grafana

1.启动node 容器

docker run -d -p 9100:9100 -v "/proc:/host/proc:ro"  -v "/sys:/host/sys:ro"  -v "/:/rootfs:ro"  --net="bridge" prom/node-exporter

2.访问http://192.168.1.122:9100/metrics

3.创建文件/home/prometheus/ 下创建prometheus.yml

global:
  scrape_interval:     60s
  evaluation_interval: 60s
 
scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets: ['localhost:9090']
        labels:
          instance: prometheus
 
  - job_name: linux
    static_configs:
      - targets: ['修改docker服务器IP:9100']
        labels:
          instance: localhost
 

3.启动prometheus 容器

docker run  -d  -p 9090:9090  -v /home/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml   prom/prometheus

访问地址:http://192.168.1.122:9090/targets

4.创建文件夹,授权

/opt/grafana-storage
 chmod 777 -R /opt/grafana-storage

5.启动grafana 容器

docker run -d -p 3030:3000 --name=grafana -v /home/grafana/grafana-storage/:/var/lib/grafana  grafana/grafana

6.访问http://192.168.1.122:3030/

附: dashbord,可以下载对应 地址:Dashboards | Grafana Labs


http://www.kler.cn/news/108914.html

相关文章:

  • Python之函数-函数概念
  • HTTPS协议:保障网络安全的加密通信协议
  • 一天掌握python爬虫【基础篇】 涵盖 requests、beautifulsoup、selenium
  • 一个基于Excel模板快速生成Excel文档的小工具
  • Python爬虫基础之Requests详解
  • USACO12OPEN Balanced Cow Subsets G(meet in the middle)
  • TensorRT量化实战课YOLOv7量化:pytorch_quantization介绍
  • 如何公网远程访问本地WebSocket服务端
  • linux中nginx配置https
  • 读书笔记:c++对话系列,Visitor模式
  • 日本IT Week秋季展丨美格智能以技术创新共建美好数字生活
  • MES的物料管理
  • 大数据前置学习基础准备(非常详细!)
  • 二进制安装部署k8s
  • 记录使用阿里 ARoute 遇到的坑
  • 你一般什么时候会用到GPT?
  • 【每日一题Day362】LC274H 指数 | 二分答案
  • 【Leetcode】【每日一题】【中等】274. H 指数
  • Python selenium交互
  • 数据结构───链表
  • JavaScript_Pig Game保存当前分数
  • nginx请求时找路径问题
  • bootstrap.yml文件未加载
  • Hive简介及核心概念
  • 剪辑中遮罩可分几种 剪辑遮罩视频怎么做
  • DIY相机(一)libcamera库
  • 【漏洞复现】酒店宽带运营系统RCE
  • Python selenium无界面headless
  • gradle多模块依赖管理最佳实践
  • Linux之系统编程