X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=filesystem%2Fetc%2Fprometheus%2Fprometheus.yml;h=51eb43bfca2bfb409aa46a20a3dffcf7c8362d83;hp=fb1e53757ffa7894871b00feaf793a9cbdfc2102;hb=dc34d23c63cd83a7cc7a79525445aad3293c7241;hpb=ac3e00755e07d2e298769000f7ea50bc0854b510 diff --git a/filesystem/etc/prometheus/prometheus.yml b/filesystem/etc/prometheus/prometheus.yml index fb1e537..51eb43b 100644 --- a/filesystem/etc/prometheus/prometheus.yml +++ b/filesystem/etc/prometheus/prometheus.yml @@ -7,7 +7,11 @@ global: ## 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). @@ -37,21 +41,44 @@ scrape_configs: static_configs: - targets: ['localhost:9090'] + labels: + instance: 'kd' - job_name: 'alertmanager' static_configs: - - targets: ['localhost:9093'] + - + targets: ['localhost:9093'] + labels: + instance: 'kd' + - job_name: simple_node file_sd_configs: - files: - /etc/prometheus/file_sd/simple_node.yml + - job_name: node - basic_auth: - username: prom - password_file: /etc/prometheus-pass + 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: