Compare commits

..

No commits in common. "c8b7e34732fbd60d78ea3803698d7243642babe0" and "706c4028f850c8b2858ac2b021fb8203de706b1c" have entirely different histories.

4 changed files with 9 additions and 27 deletions

View file

@ -33,5 +33,3 @@ then
journalctl INVOCATION_ID="$InvocationID" --output cat journalctl INVOCATION_ID="$InvocationID" --output cat
fi fi
``` ```
telegraf: execd for daemons

View file

@ -2,9 +2,7 @@
date=$(date --utc +%s%N) date=$(date --utc +%s%N)
METRICS=$(apcaccess) for metric in TIMELEFT LOADPCT BCHARGE
for METRIC in TIMELEFT LOADPCT BCHARGE
do do
echo "apcupsd $METRIC=$(grep $METRIC <<< $METRICS | cut -d ':' -f 2 | xargs | cut -d ' ' -f 1 ) $date" echo "apcupsd $metric=$(apcaccess -p $metric | cut -d' ' -f1) $date"
done done

View file

@ -20,11 +20,6 @@ files = {
'source': f"https://dl.sublimity.de/telegraf-procio/telegraf-procio-{node.metadata.get('system/architecture')}-latest", 'source': f"https://dl.sublimity.de/telegraf-procio/telegraf-procio-{node.metadata.get('system/architecture')}-latest",
'mode': '0755', 'mode': '0755',
}, },
'/usr/local/share/telegraf/pressure_stall': {
'content_type': 'download',
'source': f"https://dl.sublimity.de/telegraf-pressure-stall/telegraf-pressure-stall-{node.metadata.get('system/architecture')}-latest",
'mode': '0755',
},
} }
svc_systemd['telegraf'] = { svc_systemd['telegraf'] = {

View file

@ -52,22 +52,13 @@ defaults = {
'swap': {h({})}, 'swap': {h({})},
'system': {h({})}, 'system': {h({})},
'net': {h({})}, 'net': {h({})},
'exec': { 'exec': {h({
h({ 'commands': [
'commands': [ f'sudo /usr/local/share/telegraf/procio',
f'sudo /usr/local/share/telegraf/procio', ],
], 'data_format': 'influx',
'data_format': 'influx', 'interval': '20s',
'interval': '20s', })},
}),
h({
'commands': [
f'/usr/local/share/telegraf/pressure_stall',
],
'data_format': 'influx',
'interval': '10s',
}),
},
}, },
}, },
}, },