• imooc 使用Prometheus实践基于Spring Boot监控告警体系 笔记


    https://www.imooc.com/coursescore/1231

    安装prom

    启动

     ./prometheus --config.file=prometheus.yml

     启动,并可以通过web动态更新配置

    ./prometheus --config.file=prometheus.yml --web.enable-lifecycle

    动态更新配置

    curl -X POST http://localhost:9090/-/reload

    访问:

    http://192.168.219.129:9090/graph

    和metrics页面

    http://192.168.219.129:9090/metrics

    cat prometheus.yml

    # my global config
    global:
      scrape_interval:     15s # 抓取间隔
      evaluation_interval: 15s # 计算间隔
      # scrape_timeout is set to the global default (10s).
    
    # Alertmanager configuration
    alerting:
      alertmanagers:
      - static_configs:
        - targets:
          # - alertmanager:9093
    
    # Load rules once and periodically 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 scraped from this config.
      - job_name: 'prometheus'
    
        # metrics_path defaults to '/metrics'
        # scheme defaults to 'http'.
    
        static_configs:
        - targets: ['localhost:9090']

    grafana安装:

    https://grafana.com/grafana/download

  • 相关阅读:
    ping-tool
    yum 安装 5.6
    音视频编辑
    图表
    VC2013设置输出文件目录
    hdu 4679 Terrorist’s destroy 树形DP
    poj 3580 SuperMemo splay tree(重口味)
    hdu 1890 Robotic Sort splaytree+懒惰标记
    bzoj 1588 [HNOI2002]营业额统计 splay tree
    bzoj 1503 [NOI2004]郁闷的出纳员 splay tree
  • 原文地址:https://www.cnblogs.com/alexhjl/p/13877978.html
Copyright © 2020-2023  润新知