playground/docker-stack/prometheus.conf.yml

66 lines
1.7 KiB
YAML
Raw Normal View History

2022-10-09 16:59:31 +00:00
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: codelab-monitor
##rule_files:
## - prometheus.rules.yml
scrape_configs:
- job_name: prometheus
2022-10-30 15:40:09 +00:00
scrape_interval: 30s
2022-10-09 16:59:31 +00:00
static_configs:
- targets: ['localhost:9090']
- job_name: gitea
2022-10-30 15:40:09 +00:00
scrape_interval: 60s
2022-10-09 16:59:31 +00:00
#scheme: https
#static_configs:
# - targets: ['gitea-service-host:3000']
dns_sd_configs:
- names: ['gitea-service-host']
type: A
port: 3000
refresh_interval: 30s
- job_name: node
2022-10-30 15:40:09 +00:00
scrape_interval: 25s
2022-10-09 16:59:31 +00:00
#scheme: https
#static_configs:
# - targets: ['prometheus-node-exporter-service-host:9100']
##dns_sd_configs:
## - names: ['prometheus-node-exporter-service-host']
## type: A
## port: 9100
## refresh_interval: 30s
dockerswarm_sd_configs:
- host: tcp://prometheus-socat-service-host:2375
role: nodes
relabel_configs:
2022-10-30 15:40:09 +00:00
- source_labels:
- __meta_dockerswarm_node_address
2022-10-09 16:59:31 +00:00
target_label: __address__
replacement: $1:9100
2022-10-30 15:40:09 +00:00
- source_labels:
- __meta_dockerswarm_node_manager_leader
- __meta_dockerswarm_node_manager_address
regex: 'true;(.+):[0-9]+'
target_label: __address__
replacement: '$1:9100'
- source_labels:
- __meta_dockerswarm_node_hostname
2022-10-09 16:59:31 +00:00
target_label: instance
2022-10-30 15:40:09 +00:00
2022-10-09 16:59:31 +00:00
- job_name: cadvisor
2022-10-30 15:40:09 +00:00
scrape_interval: 60s
2022-10-09 16:59:31 +00:00
dns_sd_configs:
- names: ['cadvisor-service-host']
type: A
port: 8080
refresh_interval: 30s