aten_pdu: Also log pdu info itself
This commit is contained in:
parent
137b48cf3f
commit
17c2b560cc
1 changed files with 10 additions and 0 deletions
|
@ -52,6 +52,16 @@ ldapsearch -Q -LLL "(&(objectClass=device)(description=Aten PE*))" cn l | awk '
|
|||
}
|
||||
' | while read -r name location
|
||||
do
|
||||
for key in Current Voltage Power ; do
|
||||
topic="home/${location}/${name}/$(echo "$key" | tr '[:upper:]' '[:lower:]')"
|
||||
value="$(snmp_get "$name" "ATEN-PE-CFG:device${key}.1")"
|
||||
if $_noop ; then
|
||||
echo "${topic} -> ${value}"
|
||||
else
|
||||
mqtt_send "$topic" "$value"
|
||||
fi
|
||||
done
|
||||
|
||||
snmpwalk -v 1 -c "$community" "$name" -Oq \
|
||||
-m ATEN-PE-CFG ATEN-PE-CFG::outletName | while read -r port device
|
||||
do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue