APC SUA1500I for XigmaNAS

Smart-UPS APC SUA1500I created for XigmaNAS

APC SUA1500I for XigmaNAS screenshot 1

It is required to create extra script to retrieve the UPS data /mnt/pool/ext/extensions/telegraf/custom_scripts/upsc_status

#!/bin/sh
#

# Set environment.
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

# UPS device name
UPS_DEVNAME="apc1500"

UPS_DEVNAME_LIST=$(upsc -l)
if [ "${UPS_DEVNAME_LIST}" = "${UPS_DEVNAME}" ]; then
		UPS_BATTERY_CHARGE=$(upsc ${UPS_DEVNAME} battery.charge)
		UPS_BATTERY_RUNTIME=$(upsc ${UPS_DEVNAME} battery.runtime)
		UPS_BATTERY_TEMPERATURE=$(upsc ${UPS_DEVNAME} battery.temperature)
		UPS_BATTERY_VOLTAGE=$(upsc ${UPS_DEVNAME} battery.voltage)

		UPS_INPUT_VOLTAGE=$(upsc ${UPS_DEVNAME} input.voltage)
		UPS_OUTPUT_VOLTAGE=$(upsc ${UPS_DEVNAME} output.voltage)

		UPS_MODEL=$(upsc ${UPS_DEVNAME} ups.model)
		UPS_LOAD=$(upsc ${UPS_DEVNAME} ups.load)

		UPS_STATUS=$(upsc ${UPS_DEVNAME} ups.status)
#       if [ "${UPS_STATUS}" = "OL" ]; then
#               # UPS is on ac power.
#               UPS_STATUS="AC power"
#       elif [ "${UPS_STATUS}" = "OL CHRG" ]; then
#               # UPS is on ac/charging.
#               UPS_STATUS="AC power/charging"
#       elif [ "${UPS_STATUS}" = "OB DISCHRG" ]; then
#               # UPS is on battery power.
#               UPS_STATUS="On battery"
#       fi

		printf "ups_details battery.charge=${UPS_BATTERY_CHARGE},battery.runtime=${UPS_BATTERY_RUNTIME},battery.temperature=${UPS_BATTERY_TEMPERATURE},battery.voltage=${UPS_BATTERY_VOLTAGE},input.voltage=${UPS_INPUT_VOLTAGE},output.voltage=${UPS_OUTPUT_VOLTAGE},ups.model=\"${UPS_MODEL}\",ups.status=\"${UPS_STATUS}\",ups.load=${UPS_LOAD}"
fi
Revisions
RevisionDescriptionCreated

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies