# Sample config for Prometheus. global: ## temporary for quickly testing during development. default is 60s ## for both. # scrape_interval: 5s # evaluation_interval: 5s # and also useful # /etc/default/prometheus # --query.lookback-delta=15s # the default lookback is 5 minutes, there is a way to change # it per query in the api with a QueryOpt option, but it isnt exposed in the web ui. # Attach these labels to any time series or alerts when communicating with # external systems (federation, remote storage, Alertmanager). external_labels: monitor: kd.b8.nz # Alertmanager configuration alerting: alertmanagers: - static_configs: - targets: ['localhost:9093'] # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. rule_files: - /etc/prometheus/rules/*.yml # - "first_rules.yml" # - "second_rules.yml" # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. - job_name: 'prometheus' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['localhost:9090'] labels: instance: 'kd' - job_name: 'alertmanager' static_configs: - targets: ['localhost:9093'] labels: instance: 'kd' - job_name: simple_node file_sd_configs: - files: - /etc/prometheus/file_sd/simple_node.yml - job_name: node scheme: https tls_config: # Verifying remote identity ca_file: /etc/prometheus/ssl/prom_node_cert.pem server_name: prom_node # Asserting our identity cert_file: /etc/prometheus/ssl/prometheus_cert.pem key_file: /etc/prometheus/ssl/prometheus_key.pem file_sd_configs: - files: - /etc/prometheus/file_sd/node.yml relabel_configs: - source_labels: [__address__] regex: "localhost:9100" replacement: kd target_label: instance - source_labels: [__address__] regex: "(.*)wg:.*" # this is the default: #replacement: "${1}" target_label: instance - job_name: tlsnode scheme: https basic_auth: username: prom password_file: /etc/prometheus-pass file_sd_configs: - files: - /etc/prometheus/file_sd/tlsnode.yml