global: scrape_interval: 15s # By default, scrape targets every 15 seconds. evaluation_interval: 15s # By default, scrape targets every 15 seconds. # scrape_timeout is set to the global default (10s). external_labels: monitor: 'Alertmanager' # Load and evaluate rules in this file every 'evaluation_interval' seconds. rule_files: - 'alert.rules' scrape_configs: - job_name: 'prometheus' scrape_interval: 5s static_configs: - targets: ['localhost:9090'] - job_name: 'speedtest' metrics_path: /metrics scrape_interval: 30m scrape_timeout: 60s # running speedtest needs time to complete static_configs: - targets: ['speedtest:9798'] # This job config only works with my internet-pi configuration currently, # if you also have the shelly plug enabled there. It will just error out # by default if you don't have a Shelly Plug on your network. Someday I'll # work on making this more configurable... - job_name: 'shelly-plug' metrics_path: /metrics scrape_interval: 1m static_configs: - targets: ['172.17.0.1:9924'] - job_name: 'ping' metrics_path: /probe scrape_interval: 5s params: module: [http_2xx] # Look for a HTTP 200 response. file_sd_configs: - files: - pinghosts.yaml relabel_configs: - source_labels: [__address__] regex: '(.*);(.*);(.*);(.*)' #first is the url, thus unique for instance target_label: instance replacement: $1 - source_labels: [__address__] regex: '(.*);(.*);(.*);(.*)' #second is humanname to use in charts target_label: humanname replacement: $2 - source_labels: [__address__] regex: '(.*);(.*);(.*);(.*)' #third state whether this is testing external or internal network target_label: routing replacement: $3 - source_labels: [__address__] regex: '(.*);(.*);(.*);(.*)' #fourth is which switch/router the device is connected to. target_label: switching replacement: $4 - source_labels: [instance] target_label: __param_target - target_label: __address__ replacement: ping:9115 # The blackbox exporter's real hostname:port. - job_name: 'nodeexp' static_configs: - targets: ['nodeexp:9100']