From 2becf72559a4c621c40c5fcbb6226d1bc94ec1d1 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Wed, 10 Nov 2021 03:48:29 +0100 Subject: [PATCH] health in hatdware bundle --- bundles/hardware/metadata.py | 9 +++++++++ bundles/raspberry-pi/metadata.py | 17 ----------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/bundles/hardware/metadata.py b/bundles/hardware/metadata.py index 5cb1b7a..6000ca2 100644 --- a/bundles/hardware/metadata.py +++ b/bundles/hardware/metadata.py @@ -1,4 +1,7 @@ defaults = { + 'grafana_rows': { + 'health', + }, 'sudoers': { 'telegraf': { '/usr/local/share/icinga/plugins/cpu_frequency', @@ -13,6 +16,12 @@ defaults = { 'name_override': "cpu_frequency", 'data_format': "influx", }), + repo.libs.hashable.hashable({ + 'commands': ["/bin/bash -c 'expr $(cat /sys/class/thermal/thermal_zone0/temp) / 1000'"], + 'name_override': "cpu_temperature", + 'data_format': "value", + 'data_type': "integer", + }), }, }, }, diff --git a/bundles/raspberry-pi/metadata.py b/bundles/raspberry-pi/metadata.py index b5b2058..3b8bb02 100644 --- a/bundles/raspberry-pi/metadata.py +++ b/bundles/raspberry-pi/metadata.py @@ -1,26 +1,9 @@ h = repo.libs.hashable.hashable defaults = { - 'grafana_rows': { - 'health', - }, 'systemd-journald': { 'Storage': 'volatile', }, - 'telegraf': { - 'config': { - 'inputs': { - 'exec': { - h({ - 'commands': ["/bin/bash -c 'expr $(cat /sys/class/thermal/thermal_zone0/temp) / 1000'"], - 'name_override': "cpu_temperature", - 'data_format': "value", - 'data_type': "integer", - }), - }, - }, - }, - }, }