.yml
Configuration FilesCreate configuration files for each exporter under /etc/prometheus/exporters/
on the monitoring node.
File: /etc/prometheus/exporters/mysql.yml
scrape_configs:
- job_name: 'mysql_exporter_pssb'
static_configs:
- targets:
- pssb1avm001:9104
- pssb1avm002:9104
- pssb1abm003:9104
- pssb1avm004:9104
- pssb1avm005:9104
labels:
service_name: pssb-pxc
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
File: /etc/prometheus/exporters/scylla.yml
scrape_configs:
- job_name: 'scylla_pssb_cluster'
static_configs:
- targets:
- pssb1avm001:9180
- pssb1avm002:9180
- pssb1abm003:9180
- pssb1avm004:9180
- pssb1avm005:9180
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
File: /etc/prometheus/exporters/redpanda.yml
scrape_configs:
- job_name: 'redpanda_pssb_cluster_exporter'
metrics_path: /public_metrics
static_configs:
- targets:
- pssb1avm001:9644
- pssb1avm002:9644
- pssb1abm003:9644
- pssb1avm004:9644
- pssb1avm005:9644
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
File: /etc/prometheus/exporters/tomcat.yml
scrape_configs:
- job_name: 'tomcat_exporter_pssb'
static_configs:
- targets:
- pssb1avm001:9115
- pssb1avm002:9115
- pssb1abm003:9115
- pssb1avm004:9115
- pssb1avm005:9115
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
File: /etc/prometheus/exporters/node_exporter.yml
scrape_configs:
- job_name: 'node_exporter'
static_configs:
- targets:
- pssb1avm001:9200
- pssb1avm002:9200
- pssb1abm003:9200
- pssb1avm004:9200
- pssb1avm005:9200
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
File: /etc/prometheus/exporters/gluster.yml
scrape_configs:
- job_name: 'gluster_pssb'
metrics_path: /metrics
scrape_interval: 60s
scrape_timeout: 60s
static_configs:
- targets:
- pssb1avm001:9106
- pssb1avm002:9106
- pssb1abm003:9106
- pssb1avm004:9106
- pssb1avm005:9106
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: '([^:]+)(:[0-9]+)?'
replacement: '${1}'
Add the exporter .yml
files to Prometheus’ main configuration file /etc/prometheus/prometheus.yaml
:
scrape_configs:
- include: '/etc/prometheus/exporters/*.yml'
Validate the configuration:
promtool check config /etc/prometheus/prometheus.yaml
Reload Prometheus to apply the updated configurations:
curl -X POST http://172.21.0.45:9090/-/reload
http://172.21.0.45:9090/targets
.UP
.q