Perform the following steps on an Filr server:
Download and unzip the Prometheus file from Prometheus download site (https://prometheus.io/download/).
tar xfvz prometheus-2.43.0.linux-amd64.tar.gz
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.
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: Filr Servers
static_configs:
- targets: ['localhost:9100', 'filrnode01:9100', 'filrnode02:9100', 'filrnode03:9100', 'filrnode04.com']
- job_name: 'alert-manager'
static_configs:
- targets: ['localhost:9093']