X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=filesystem%2Fetc%2Fprometheus%2Fprometheus.yml;h=51eb43bfca2bfb409aa46a20a3dffcf7c8362d83;hb=dc34d23c63cd83a7cc7a79525445aad3293c7241;hp=9932335b0dca4ef0d2728047879a5400fd8eab93;hpb=e958999a4ab6fddd723270b596b4899c0811fa41;p=distro-setup diff --git a/filesystem/etc/prometheus/prometheus.yml b/filesystem/etc/prometheus/prometheus.yml index 9932335..51eb43b 100644 --- a/filesystem/etc/prometheus/prometheus.yml +++ b/filesystem/etc/prometheus/prometheus.yml @@ -1,6 +1,18 @@ # 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: @@ -29,14 +41,44 @@ scrape_configs: 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 - 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: