aboutsummaryrefslogtreecommitdiff
path: root/templates/node_exporter.runit
diff options
context:
space:
mode:
Diffstat (limited to 'templates/node_exporter.runit')
-rw-r--r--templates/node_exporter.runit13
1 files changed, 13 insertions, 0 deletions
diff --git a/templates/node_exporter.runit b/templates/node_exporter.runit
new file mode 100644
index 0000000..b7a75f0
--- /dev/null
+++ b/templates/node_exporter.runit
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+cd "{{node_exporter_home_dir}}/conf"
+exec 3>>{{node_exporter_log}} 2>&3 1>&3
+
+{% if not node_exporter_tls %}
+exec {{node_exporter_home_dir}}/node_exporter/node_exporter \
+ {{node_exporter_opts | replace('\n', ' ')}} \
+{% else %}
+exec {{node_exporter_home_dir}}/node_exporter/node_exporter \
+ {{node_exporter_opts | replace('\n', ' ')}} \
+ --web.config="web_config.yml" \
+{% endif %}