From 8fe3f967e5c74de99aa171096072ca22d3558b49 Mon Sep 17 00:00:00 2001 From: tec <tec@ucc.gu.uwa.edu.au> Date: Tue, 14 Jan 2020 14:51:49 +0800 Subject: [PATCH] Add a template for simple monitoring --- numeric_log.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 numeric_log.j2 diff --git a/numeric_log.j2 b/numeric_log.j2 new file mode 100644 index 0000000..565bd0b --- /dev/null +++ b/numeric_log.j2 @@ -0,0 +1,9 @@ +#!/bin/bash +# +# {{item.description | default('')}} +# +# Usage: add this to crontab: +# */5 * * * * /usr/local/bin/ucc_node_{{item.name}}.sh > /var/lib/node_exporter/{{item.name}}.prom +echo "# HELP node_{{item.name}} {{item.description | default('')}} +# TYPE node_{{item.name}} {{ item.type | default('gauge') }} +node_{{item.name}} $({{item.cmd}})" -- GitLab