# Sample config for Prometheus.
global:
- # Attach these labels to any time series or alerts when communicating with
- # external systems (federation, remote storage, Alertmanager).
- external_labels:
- monitor: kd.b8.nz
+
+
+ ## 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.
+
# Alertmanager configuration
alerting:
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: