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
fi
```
telegraf: execd for daemons

View file

@ -2,9 +2,7 @@
date=$(date --utc +%s%N)
METRICS=$(apcaccess)
for METRIC in TIMELEFT LOADPCT BCHARGE
for metric in TIMELEFT LOADPCT BCHARGE
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

View file

@ -20,11 +20,6 @@ files = {
'source': f"https://dl.sublimity.de/telegraf-procio/telegraf-procio-{node.metadata.get('system/architecture')}-latest",
'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'] = {

View file

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