HeinleinSupport / check_mk_extensions

check_mk Plugins
https://www.heinlein-consulting.de/
GNU General Public License v2.0
233 stars 107 forks source link

apcaccess - No selftest in CheckMK #160

Closed 47k closed 5 months ago

47k commented 5 months ago

Hello

Can you add the selftest to the output on CheckMK:

Output from the agent

[[apcupsd.conf]]
APC      : 001,050,1237
DATE     : 2024-05-22 09:34:31 +0100
HOSTNAME : usv
VERSION  : 3.14.14 (31 May 2016) debian
UPSNAME  : USV
CABLE    : Custom Cable Smart
DRIVER   : APC Smart UPS (any)
UPSMODE  : Stand Alone
STARTTIME: 2024-04-24 11:02:16 +0100
MODEL    : Smart-UPS SC450 RM
STATUS   : ONLINE
LINEV    : 227.5 Volts
LOADPCT  : 33.1 Percent
BCHARGE  : 100.0 Percent
TIMELEFT : 35.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
MAXLINEV : 228.9 Volts
MINLINEV : 227.5 Volts
OUTPUTV  : 227.5 Volts
SENSE    : High
DWAKE    : 0 Seconds
DSHUTD   : 60 Seconds
DLOWBATT : 2 Minutes
LOTRANS  : 208.0 Volts
HITRANS  : 253.0 Volts
RETPCT   : 0.0 Percent
ALARMDEL : 5 Seconds
BATTV    : 13.8 Volts
LINEFREQ : 50.0 Hz
LASTXFER : Automatic or explicit self test
NUMXFERS : 7
XONBATT  : 2024-05-18 19:58:27 +0100
TONBATT  : 0 Seconds
CUMONBATT: 13521 Seconds
XOFFBATT : 2024-05-18 20:32:00 +0100
LASTSTEST: 2024-05-18 19:58:27 +0100
        SELFTEST : NO   <--------------------------------------------------------
STESTI   : OFF
STATFLAG : 0x05000008
REG1     : 0x00
REG2     : 0x00
REG3     : 0x00
MANDATE  : 02/22/19
SERIALNO : xxxxxxxxxxxxxx
BATTDATE : 02/22/19
NOMOUTV  : 230 Volts
NOMBATTV : 12.0 Volts
FIRMWARE : 736.1.I
END APC  : 2024-05-22 09:34:57 +0100

This is the CheckMK output:

APC apcupsd.conf Status UPSNAME: USV, MODEL: Smart-UPS SC450 RM, SERIALNO: xxxxxxxxxxxxxx, FIRMWARE: 736.1.I, UPSMODE: Stand Alone, Output Voltage: 228V, Output Load: 32.50%, Battery Capacity: 100.00%, Time Left: 34 minutes 0 seconds
gurubert commented 5 months ago

Version 5.3.0 of the extension will output the content of SELFTEST if it is not NO and set the service state to WARN.