Zabbix Монниторинг UPS APC средствами NUT

Исходные:
CentOS 6.5 на VMWare ESX 5.5
Zabbix 2.2.3
APC 3000 XL подключен через USB (проброшен в VMWare)

Шаблон вложен: zbx_export_templates-ups-nut.xml

В Узел сети добавляем MACRO:

{$UPSNAME} = apc3000

Конфиги:
/etc/ups/ups.conf

[apc3000]
driver = usbhid-ups
port = auto
desc = "APC Smart-UPS 3000 XL"

Проверяем получение данныз

# upsc apc3000

Должны получить вывод:

battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.mfr.date: 2012/11/09
battery.runtime: 19680
battery.runtime.low: 120
battery.temperature: 18.9
battery.type: PbAc
battery.voltage: 54.8
battery.voltage.nominal: 48.0
device.mfr: American Power Conversion
device.model: Smart-UPS 3000 RM XL
device.serial: AS1245248425
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: APC HID 0.95
driver.version.internal: 0.38
input.sensitivity: high
input.transfer.high: 253
input.transfer.low: 208
input.voltage: 224.6
output.current: 1.69
output.frequency: 50.0
output.voltage: 224.6
output.voltage.nominal: 230.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.firmware: 691.19.I
ups.firmware.aux: 7.4
ups.load: 14.3
ups.mfr: American Power Conversion
ups.mfr.date: 2012/11/09
ups.model: Smart-UPS 3000 RM XL
ups.productid: 0002
ups.serial: AS1245248425
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.timer.start: -1
ups.vendorid: 051d

Добавляем в /etc/zabbix/zabbix_agentd.conf

# UPS ----------------------
UserParameter=upsmon[*],/etc/zabbix/ups_status.sh $1 $2

Скрипт /etc/zabbix/ups_status.sh

#!/bin/sh

ups=$1
key=$2

if [ $key = ups.status.ok ]
then
{
    # по-умолчанию статус "NOT OK"
    result=0

    state=`/usr/bin/upsc $ups ups.status`
    case $state in
        OL) result=1 ;; # OK
        * ) result=0 ;; # not OK
    esac

    echo $result

}
else
{
/usr/bin/upsc $ups $key
}
fi