当前位置:网站首页>Prometheus installation configuration

Prometheus installation configuration

2020-11-09 22:37:56 There is no end to learning

One 、 What is? Prometheus?

  Prometheus Inspired by Google Of Brogmon The monitoring system ( alike Kubernetes It's from Google Of Brog The system evolved ), from 2012 From before Google The engineer is in Soundcloud Research and development in the form of open source software , And 2015 The early version was released to the public in the early years .2016 year 5 Month follow Kubernetes And then became the second official to join CNCF The project of the foundation , Same year 6 Officially released in 1.0 edition .2017 At the end of the year, we released 2.0 edition , Better with container platform 、 Cloud platform with .

Two 、 How to install Prometheus?

1. download prometheus Installation package (linux edition ) To /opt/minitor/prometheus .
        
 
2. function tar -zxvf prometheus-2.0.0.linux-amd64.tar.gz , Extract the file to the current directory .
 
3. perform vim /opt/minitor/prometheus/prometheus.yml.
# my global config
global:
  scrape_interval:     5s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 5s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).
 
# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
#     - targets: ['localhost:9093']
 
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "/opt/prometheus/prome/prometheus-2.0.0.linux-amd64/rules/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: ['ip:9090']
        labels:
          instance: prometheus

 

4. start-up prometheus.
nohup ./prometheus --config.file=prometheus.yml --web.listen-address=:9090 &

 

5. Go to prometheus Self contained web View... On the page

 

 

6.prometheus Status as up, Indicating successful configuration .

版权声明
本文为[There is no end to learning]所创,转载请带上原文链接,感谢