Compare commits
No commits in common. "c8b7e34732fbd60d78ea3803698d7243642babe0" and "706c4028f850c8b2858ac2b021fb8203de706b1c" have entirely different histories.
c8b7e34732
...
706c4028f8
4 changed files with 9 additions and 27 deletions
|
@ -33,5 +33,3 @@ then
|
|||
journalctl INVOCATION_ID="$InvocationID" --output cat
|
||||
fi
|
||||
```
|
||||
|
||||
telegraf: execd for daemons
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'] = {
|
||||
|
|
|
@ -52,22 +52,13 @@ defaults = {
|
|||
'swap': {h({})},
|
||||
'system': {h({})},
|
||||
'net': {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',
|
||||
}),
|
||||
},
|
||||
'exec': {h({
|
||||
'commands': [
|
||||
f'sudo /usr/local/share/telegraf/procio',
|
||||
],
|
||||
'data_format': 'influx',
|
||||
'interval': '20s',
|
||||
})},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue