Compare commits
3 commits
706c4028f8
...
c8b7e34732
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c8b7e34732 | ||
![]() |
bb6eeba6fb | ||
![]() |
6c2d4ca69f |
4 changed files with 27 additions and 9 deletions
|
@ -33,3 +33,5 @@ then
|
|||
journalctl INVOCATION_ID="$InvocationID" --output cat
|
||||
fi
|
||||
```
|
||||
|
||||
telegraf: execd for daemons
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
date=$(date --utc +%s%N)
|
||||
|
||||
for metric in TIMELEFT LOADPCT BCHARGE
|
||||
METRICS=$(apcaccess)
|
||||
|
||||
for METRIC in TIMELEFT LOADPCT BCHARGE
|
||||
do
|
||||
echo "apcupsd $metric=$(apcaccess -p $metric | cut -d' ' -f1) $date"
|
||||
echo "apcupsd $METRIC=$(grep $METRIC <<< $METRICS | cut -d ':' -f 2 | xargs | cut -d ' ' -f 1 ) $date"
|
||||
done
|
||||
|
|
|
@ -20,6 +20,11 @@ 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,13 +52,22 @@ defaults = {
|
|||
'swap': {h({})},
|
||||
'system': {h({})},
|
||||
'net': {h({})},
|
||||
'exec': {h({
|
||||
'commands': [
|
||||
f'sudo /usr/local/share/telegraf/procio',
|
||||
],
|
||||
'data_format': 'influx',
|
||||
'interval': '20s',
|
||||
})},
|
||||
'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',
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue