mostly start using prometheus
[distro-setup] / filesystem / etc / prometheus / prometheus.yml
diff --git a/filesystem/etc/prometheus/prometheus.yml b/filesystem/etc/prometheus/prometheus.yml
new file mode 100644 (file)
index 0000000..9932335
--- /dev/null
@@ -0,0 +1,47 @@
+# 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
+
+# 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=<job_name>` to any timeseries scraped from this config.
+  - job_name: 'prometheus'
+
+    # metrics_path defaults to '/metrics'
+    # scheme defaults to 'http'.
+
+    static_configs:
+      - targets: ['localhost:9090']
+
+  - job_name: node
+    basic_auth:
+      username: prom
+      password_file: /etc/prometheus-pass
+    file_sd_configs:
+      - files:
+        - /etc/prometheus/file_sd/node.yml
+  - job_name: tlsnode
+    scheme: https
+    basic_auth:
+      username: prom
+      password_file: /etc/prometheus-pass
+    file_sd_configs:
+      - files:
+        - /etc/prometheus/file_sd/tlsnode.yml