Added an endpoint for UPS stats.
This commit is contained in:
parent
864d4385c3
commit
3de70efa44
@ -28,3 +28,4 @@ UserParameter=unraid.disks.totals,/usr/local/emhttp/plugins/zabbix_agent/scripts
|
||||
UserParameter=unraid.qemu.discovery,/usr/local/emhttp/plugins/zabbix_agent/scripts/qemu.discovery.sh
|
||||
UserParameter=unraid.qemu[*],/usr/local/emhttp/plugins/zabbix_agent/scripts/qemu.sh "$1"
|
||||
UserParameter=unraid.temperatures,/usr/local/emhttp/plugins/zabbix_agent/scripts/temperatures.sh
|
||||
UserParameter=unraid.ups,/usr/local/emhttp/plugins/zabbix_agent/scripts/ups.sh
|
||||
|
15
files/usr/local/emhttp/plugins/zabbix_agent/scripts/ups.sh
Executable file
15
files/usr/local/emhttp/plugins/zabbix_agent/scripts/ups.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo -n '{"connected":true'
|
||||
apcaccess | while read key _ value unit _; do
|
||||
#echo $key - $value - $unit
|
||||
case "$key" in
|
||||
"STATUS") echo -n ", \"status\":\"$value\"" ;;
|
||||
"LOADPCT") echo -n ", \"loadpct\":$value" ;;
|
||||
"BCHARGE") echo -n ", \"bcharge\":$value" ;;
|
||||
"TIMELEFT") echo -n ", \"timeleft\":$value" ;;
|
||||
"BATTV") echo -n ", \"battv\":$value" ;;
|
||||
"LINEV") echo -n ", \"linev\":$value" ;;
|
||||
esac
|
||||
done
|
||||
echo "}"
|
@ -20,6 +20,7 @@
|
||||
### &version;
|
||||
- Updated zabbix_agentd from 5.0.2 to 5.0.3
|
||||
- Download updated plugins from stable instead of main.
|
||||
- Added new zabbix endpoint unraid.ups
|
||||
|
||||
### 2020.09.05.1
|
||||
- Added a new field 'running' to qemu.disk
|
||||
|
Loading…
Reference in New Issue
Block a user