aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2021-10-17 20:41:13 -0400
committerMitchell Riedstra <mitch@riedstra.dev>2021-10-17 20:41:13 -0400
commit4db1380d6e401fdcafdea847d5a74a86be51f8c4 (patch)
treecea2b2b60ecb2adbb4ace7be24ac7d52660707b5 /templates
downloadnode_exporter-4db1380d6e401fdcafdea847d5a74a86be51f8c4.tar.gz
node_exporter-4db1380d6e401fdcafdea847d5a74a86be51f8c4.tar.xz
InitialHEADmaster
Diffstat (limited to 'templates')
-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 %}