pfSense-Dashboard/plugins/telegraf_temperature.sh
Victor Robellini 4e90aba00b forgot to add the telegraf_gateways.py script
also updated permissions on the plugs to be the same as my pfSense system
2020-04-04 18:57:41 -04:00

6 lines
404 B
Bash
Executable File

#!/bin/sh
HOSTNAME=$(hostname)
sysctl dev.cpu | fgrep temperature | tr -d '[:blank:]' | awk -v HOST="$HOSTNAME" -F '[.:]' '{print "temperature,sensor="$2$3",host="HOST" degrees=" $5"."substr($6, 1, length($6)-1)}'
sysctl hw.acpi.thermal | fgrep temperature | tr -d '[:blank:]' | awk -v HOST="$HOSTNAME" -F '[.:]' '{print "temperature,sensor="$4",host="HOST" degrees="$6"." substr($7, 1, length($7)-1)}'