Crmgo Blog

Zabbix + USV (Überwachung des Stromausfalls)

Zabbix + USV (Überwachung des Stromausfalls)

yum install usbutils apcupsd (das Paket apcupsd-cgi benötigen wir für die Web-Oberfläche nicht) lsusb vim /etc/apcupsd/apcupsd.conf service apcupsd start chkconfig apcupsd on apcaccess status vim /etc/zabbix/zabbix_agentd.d/ups.conf Auf dem Server erstellen wir 3 Items: ups.charge, ups.status, ups.volts Für ups.status setzen wir einen Trigger: Für die restlichen…

Zabbix + USV (Überwachung des Stromausfalls)

yum install usbutils apcupsd

(das Paket apcupsd-cgi wird für die Web-Oberfläche nicht benötigt)

lsusb

Bus 001 Device 003: ID 0d9f:0004 Powercom Co., Ltd

vim /etc/apcupsd/apcupsd.conf

## apcupsd.conf v1.1 ##
UPSNAME Powercom
UPSCABLE usb
UPSTYPE usb
DEVICE 
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

service apcupsd start

chkconfig apcupsd on

apcaccess status

APC : 001,036,0834
DATE : 2017-03-15 12:47:43 +0200 
HOSTNAME : KVM1
VERSION : 3.14.12 (29 March 2014) redhat
UPSNAME : Powercom
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2017-03-15 12:44:12 +0200 
MODEL : HID UPS Battery
STATUS : ONLINE 
LINEV : 220.0 Volts
LOADPCT : 0.0 Percent
BCHARGE : 96.0 Percent
TIMELEFT : 409.6 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
OUTPUTV : 220.0 Volts
DWAKE : 0 Seconds
ITEMP : -273.1 C
ALARMDEL : No alarm
BATTV : 220.0 Volts
LINEFREQ : 50.0 Hz
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : OK
STATFLAG : 0x05000008
MANDATE : 2009-12-23
SERIALNO : 004-0D9F-000
BATTDATE : 2009-12-23
NOMOUTV : 220 Volts
NOMINV : 220 Volts
NOMBATTV : 220.0 Volts
END APC : 2017-03-15 12:47:43 +0200

vim /etc/zabbix/zabbix_agentd.d/ups.conf

UserParameter=ups.status,apcaccess -p STATUS
UserParameter=ups.charge,apcaccess -p BCHARGE | awk -F "." '{print $1}'
UserParameter=ups.volts,apcaccess -p LINEV | awk -F "." '{print $1}'

Auf dem Server erstellen wir 3 Items:

ups.charge, ups.status, ups.volts

Für ups.status setzen wir einen Trigger:

Für die anderen Items setzen wir ein Diagramm:

Hinweis: Dieser Beitrag kann KI-unterstützt erstellt und anschließend redaktionell geprüft worden sein. Verantwortlich: Dmytro Lomaka, Kaltenkirchen.