mirror of
https://github.com/prometheus/prometheus
synced 2026-05-01 07:30:30 +08:00
Add Uyuni service discovery (#8190)
* Add Uyuni service discovery Signed-off-by: Witek Bedyk <witold.bedyk@suse.com> Co-authored-by: Joao Cavalheiro <jcavalheiro@suse.de> Co-authored-by: Marcelo Chiaradia <mchiaradia@suse.com> Co-authored-by: Stefano Torresi <stefano@torresi.io> Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
This commit is contained in:
36
documentation/examples/prometheus-uyuni.yml
Normal file
36
documentation/examples/prometheus-uyuni.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
# A example scrape configuration for running Prometheus with Uyuni.
|
||||
|
||||
scrape_configs:
|
||||
|
||||
# Make Prometheus scrape itself for metrics.
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
# Discover Uyuni managed targets to scrape.
|
||||
- job_name: 'uyuni'
|
||||
|
||||
# Scrape Uyuni itself to discover new services.
|
||||
uyuni_sd_configs:
|
||||
- server: http://uyuni-project.org
|
||||
username: gopher
|
||||
password: hole
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_uyuni_exporter]
|
||||
target_label: exporter
|
||||
- source_labels: [__meta_uyuni_groups]
|
||||
target_label: groups
|
||||
- source_labels: [__meta_uyuni_minion_hostname]
|
||||
target_label: hostname
|
||||
- source_labels: [__meta_uyuni_primary_fqdn]
|
||||
regex: (.+)
|
||||
target_label: hostname
|
||||
- source_labels: [hostname, __address__]
|
||||
regex: (.*);.*:(.*)
|
||||
replacement: ${1}:${2}
|
||||
target_label: __address__
|
||||
- source_labels: [__meta_uyuni_metrics_path]
|
||||
regex: (.+)
|
||||
target_label: __metrics_path__
|
||||
- source_labels: [__meta_uyuni_proxy_module]
|
||||
target_label: __param_module
|
||||
Reference in New Issue
Block a user