3.2 Installing Prometheus on OES 2023 or SLES 15 SP4

Perform the following steps on an OES server:

  1. Download and unzip the Prometheus file from Prometheus download site (https://prometheus.io/download/).

    tar xfvz prometheus-2.43.0.linux-amd64.tar.gz

  2. Copy the prometheus.sh script to the unzipped directory and run it. See, prometheus.sh.

    sh ./prometheus.sh

    This script creates user, group, directories, and changes the ownership of the unzipped files and finally creates a service file to start Prometheus service.

  3. Edit /etc/prometheus/exporter-config.yml file to add new metric endpoints (target).

    NOTE:Use static_configuration to specify a list of targets and a common labels. It is the canonical way to specify static targets in a scrape configuration.

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: Docker Servers
    static_configs:
      - targets: ['localhost:8080']
  - job_name: OES Servers
    static_configs:
      - targets: ['localhost:9100', 'oesnode01:9100', 'oesnode02:9100', 'oesnode03:9100', 'oesnode04.com']

  - job_name: 'alert-manager'
    static_configs:
      - targets: ['localhost:9093']