From a83c53c2997327c9ee7ddf4856c6360ccf541a0a Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sun, 17 Oct 2021 20:45:38 -0400 Subject: Update prometheus, alertmanager and add a few new options TLS Support for everything if you configure the vars properly. Blackbox exporter. Alertmanager discord for sending alerts there via webhooks. Runit services for all of them. --- templates/alertmanager.runit | 2 +- templates/alertmanager_discord.runit | 6 ++++++ templates/blackbox_exporter.runit | 7 +++++++ templates/prometheus.runit | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 templates/alertmanager_discord.runit create mode 100644 templates/blackbox_exporter.runit (limited to 'templates') diff --git a/templates/alertmanager.runit b/templates/alertmanager.runit index e300d47..4c53493 100644 --- a/templates/alertmanager.runit +++ b/templates/alertmanager.runit @@ -1,6 +1,6 @@ #!/bin/sh +exec 3>>{{alertmanager_log}} 2>&3 1>&3 exec chpst -u {{prometheus_user}} \ {{prometheus_home_dir}}/alertmanager/alertmanager \ {{alertmanager_opts | replace('\n', ' ')}} \ - >> {{alertmanager_log}} 2>&1 diff --git a/templates/alertmanager_discord.runit b/templates/alertmanager_discord.runit new file mode 100644 index 0000000..28f82a8 --- /dev/null +++ b/templates/alertmanager_discord.runit @@ -0,0 +1,6 @@ +#!/bin/sh +exec 3>>{{alertmanager_discord_log}} 2>&3 1>&3 +exec chpst -u {{prometheus_user}} \ + {{prometheus_home_dir}}/alertmanager_discord \ + {{alertmanager_discord_opts | replace('\n', ' ')}} + diff --git a/templates/blackbox_exporter.runit b/templates/blackbox_exporter.runit new file mode 100644 index 0000000..115bc7b --- /dev/null +++ b/templates/blackbox_exporter.runit @@ -0,0 +1,7 @@ +#!/bin/sh +exec 3>>{{blackbox_exporter_log}} 2>&3 1>&3 +exec chpst -u {{prometheus_user}} \ + {{prometheus_home_dir}}/blackbox_exporter/blackbox_exporter \ + {{blackbox_exporter_opts | replace('\n', ' ')}} \ + + diff --git a/templates/prometheus.runit b/templates/prometheus.runit index b14e2d1..9866d08 100644 --- a/templates/prometheus.runit +++ b/templates/prometheus.runit @@ -1,5 +1,5 @@ #!/bin/sh +exec 3>>{{prometheus_log}} 2>&3 1>&3 exec chpst -u {{prometheus_user}} \ {{prometheus_home_dir}}/prometheus/prometheus \ {{prometheus_opts | replace('\n', ' ')}} \ - > {{prometheus_log}} 2>&1 -- cgit v1.2.3