print( sjw.iq == 200) output : true

[postgres_exporter] 설치 및 셋팅 본문

카테고리 없음

[postgres_exporter] 설치 및 셋팅

sjwiq200 2023. 2. 17. 15:37
728x90
반응형

설치.

sudo apt-get -y install prometheus-postgres-exporter

 

실행.

systemctl start prometheus-postgres-exporter

 

 

/etc/prometheus/prometheus.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'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s
    scrape_timeout: 5s

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ['localhost:9090']

#  - job_name: node
    # If prometheus-node-exporter is installed, grab stats about the local
    # machine by default.
#    static_configs:
#      - targets: ['localhost:9100']

  - job_name: 'pgexporter'
    static_configs:
      - targets: ['localhost:9187']

 

prometheus 재실행.

sudo systemctl restart prometheus

 

 

## data source 설정

/etc/default/prometheus-postgres-exporter 파일

728x90
반응형
Comments