腾讯mini项目-【指标监控服务重构】2023-08-27

今日已办

Docker Monitoring with cAdvisor, Prometheus and Grafana

  • Docker Monitoring with cAdvisor, Prometheus and Grafana | by Mertcan Simsek | Medium
  • Monitoring Docker container metrics using cAdvisor | Prometheus

prometheus.yml

global:
  scrape_interval: 10s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 10s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

scrape_configs:
  - job_name: aggregated-trace-metrics
    static_configs:
      - targets: [ 'otel_collector:8889' ]
  - job_name: cadvisor
    metrics_path: /cadvisor/metrics
    static_configs:
      - targets: [ 'cadvisor:8080' ]

腾讯mini项目-【指标监控服务重构】2023-08-27_第1张图片

可以收集到 cadvisor 监控的各个容器的指标

腾讯mini项目-【指标监控服务重构】2023-08-27_第2张图片

  • cadvisor/docs/api.md at master · google/cadvisor (github.com)

腾讯mini项目-【指标监控服务重构】2023-08-27_第3张图片

修复了 Prometheus 修改 web 前缀的问题

  • [Using external URLs and proxies with Prometheus – Robust Perception | Prometheus Monitoring Experts](https://www.robustperception.io/using-external-urls-and-proxies-with-prometheus/#:~:text=prometheus --web.external-url %3A19090%2Fprometheus%2F You should be aware that,The %2Fmetrics will be on %3A9090%2Fprometheus%2Fmetrics for example.)

  • Prometheus Routing and Routing Configuration with Nginx Reverse Proxy - SoByte

腾讯mini项目-【指标监控服务重构】2023-08-27_第4张图片

成功使用 traefik 代理

腾讯mini项目-【指标监控服务重构】2023-08-27_第5张图片

明日待办

  1. 完成课程报告
  2. 制作PPT

你可能感兴趣的:(腾讯mini项目,go,prometheus,clickhouse)