aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/alertmanager.runit6
-rw-r--r--templates/prometheus.runit (renamed from templates/prometheus/runit/run)0
-rw-r--r--templates/prometheus/prometheus.yml53
-rw-r--r--templates/prometheus/systemd.unit12
4 files changed, 6 insertions, 65 deletions
diff --git a/templates/alertmanager.runit b/templates/alertmanager.runit
new file mode 100644
index 0000000..e300d47
--- /dev/null
+++ b/templates/alertmanager.runit
@@ -0,0 +1,6 @@
+#!/bin/sh
+exec chpst -u {{prometheus_user}} \
+ {{prometheus_home_dir}}/alertmanager/alertmanager \
+ {{alertmanager_opts | replace('\n', ' ')}} \
+ >> {{alertmanager_log}} 2>&1
+
diff --git a/templates/prometheus/runit/run b/templates/prometheus.runit
index b14e2d1..b14e2d1 100644
--- a/templates/prometheus/runit/run
+++ b/templates/prometheus.runit
diff --git a/templates/prometheus/prometheus.yml b/templates/prometheus/prometheus.yml
deleted file mode 100644
index 2099b8b..0000000
--- a/templates/prometheus/prometheus.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-# my global config
-global:
- scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
- evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
- # scrape_timeout is set to the global default (10s).
-
-# Alertmanager configuration
-alerting:
- alertmanagers:
- - static_configs:
- - targets:
- # - alertmanager:9093
-
-# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
-rule_files:
- # - "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: 'netdata'
-
- metrics_path: /api/v1/allmetrics
- params:
- format: [ prometheus ]
-
- static_configs:
-{% for h in prometheus_netdata_hosts %} - targets: ['{{h}}']
-{%endfor%}
-
-{% if prometheus_netdata_tls_hosts is defined %}
- - job_name: 'netdata_tls'
-
- scheme: https
-
- metrics_path: /api/v1/allmetrics
- params:
- format: [ prometheus ]
-
- static_configs:
-{% for h in prometheus_netdata_tls_hosts %} - targets: ['{{h}}']
-{%endfor%}
-{% endif %}
diff --git a/templates/prometheus/systemd.unit b/templates/prometheus/systemd.unit
deleted file mode 100644
index b1bd6cb..0000000
--- a/templates/prometheus/systemd.unit
+++ /dev/null
@@ -1,12 +0,0 @@
-# /etc/systemd/system/prometheus.service
-[Unit]
-Description=Prometheus Server
-Documentation=https://prometheus.io/docs/introduction/overview/
-After=network-online.target
-
-[Service]
-User=prometheus
-Restart=on-failure
-ExecStart={{prometheus_home_dir}}/prometheus/prometheus {{prometheus_opts | replace('\n', ' ')}}
-[Install]
-WantedBy=multi-user.target