美文网首页
Promethues使用记录

Promethues使用记录

作者: 调雨为酥 | 来源:发表于2020-05-29 16:39 被阅读0次

    下载Promethues

    官网下载地址:https://prometheus.io/download/
    下载Linux版本:https://github.com/prometheus/prometheus/releases/download/v2.18.1/prometheus-2.18.1.linux-amd64.tar.gz

    wget "https://github.com/prometheus/prometheus/releases/download/v2.18.1/prometheus-2.18.1.linux-amd64.tar.gz"
    

    安装Promethues

    官网提供的安装方法:https://prometheus.io/docs/prometheus/latest/getting_started/

    tar xvfz prometheus-*.tar.gz
    cd prometheus-*
    

    修改配置文件prometheus.yml

    global:
      scrape_interval:     15s # By default, scrape targets every 15 seconds.
    
      # Attach these labels to any time series or alerts when communicating with
      # external systems (federation, remote storage, Alertmanager).
      external_labels:
        monitor: 'codelab-monitor'
    
    # 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'
    
        # Override the global default and scrape targets from this job every 5 seconds.
        scrape_interval: 5s
    
        static_configs:
          - targets: ['localhost:9090']
    

    启动Promethues

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

    启动之后打开网址http://localhost:9090/

    探索更多

    https://blog.csdn.net/u012129558/article/details/92087707
    中文文档:https://prometheus.fuckcloudnative.io/

    相关文章

      网友评论

          本文标题:Promethues使用记录

          本文链接:https://www.haomeiwen.com/subject/xicfzhtx.html