Skip to content

Commit

Permalink
[ups-nut] Add temperature readout (#508)
Browse files Browse the repository at this point in the history
* Add temperature readout

expose Battery Temperature value

* Update ups-nut.sh
  • Loading branch information
Npeca75 committed Feb 26, 2024
1 parent a729c36 commit 7a50deb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions snmp/ups-nut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ do
fi
done

UPSTEMP="ups\.temperature: [0-9.]+"
OUT=$(echo "$TMP" | grep -Eo "$UPSTEMP" | awk '{print $2}' | LANG=C sort | head -n 1)
[ -n "$OUT" ] && echo "$OUT" || echo "Unknown"

0 comments on commit 7a50deb

Please sign in to comment.