前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >监控-环境搭建

监控-环境搭建

原创
作者头像
heelynn
修改2024-10-18 13:00:04
1100
修改2024-10-18 13:00:04
举报
文章被收录于专栏:监控

环境搭建

采用Prometheus+Grafana+AlertManager作为监控组件

应用部署

使用docker-compose快速搭建测试环境

  • 示例
代码语言:yaml
复制
version: "3"
services:
  prometheus:
    image: prom/prometheus
    container_name: prometheus
    user: root
    ports:
      - "9090:9090"
    volumes:
      - /root/prometheus:/etc/prometheus
      - /root/prometheus/prometheus_db:/prometheus 
    command:
      - '--config.file=/etc/prometheus/prometheus.yaml'
      - '--storage.tsdb.path=/prometheus'
      - '--web.console.libraries=/usr/share/prometheus/console_libraries'
      - '--web.console.templates=/usr/share/prometheus/consoles'
      - '--web.enable-lifecycle'
    networks:
      - net-prometheus
      
  grafana:
    image: grafana/grafana
    container_name: grafana
    user: root
    ports:
      - "3000:3000"
    volumes:
      - ./data/prometheus/grafana_data:/var/lib/grafana
    depends_on:  
      - prometheus
    networks:
      - net-prometheus
  alertmanager:
    image: prom/alertmanager
    hostname: alertmanager
    container_name: alertmanager
    user: root
    ports:
      - "9093:9093"
    volumes:
      - ./data/prometheus/alertmanager_data:/var/lib/alertmanager
    command:
      - '--storage.path=/var/lib/alertmanager/data/'
      - '--config.file=/var/lib/alertmanager/alertmanager.yaml'
networks:
  net-prometheus:

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 环境搭建
    • 应用部署
    相关产品与服务
    Prometheus 监控服务
    Prometheus 监控服务(TencentCloud Managed Service for Prometheus,TMP)是基于开源 Prometheus 构建的高可用、全托管的服务,与腾讯云容器服务(TKE)高度集成,兼容开源生态丰富多样的应用组件,结合腾讯云可观测平台-告警管理和 Prometheus Alertmanager 能力,为您提供免搭建的高效运维能力,减少开发及运维成本。
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档