Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ https://github.com/networkupstools/nut/milestone/12
mappings. Suggest how user can help improve the driver if too few data
points were seen, or if the `mibs=auto` detection only found the fallback
IETF mapping. [PR #3095]
* Added new vendor extension mappings for Vertiv Liebert UPS, tested with
PSI5-750MT120 UPS model and IS-UNITY-DP (Firmware 8.4.7.0) SNMP card.
[issue #3296, PR #3299]

- `tripplite_usb` driver updates:
* Added support for Tripplite protocol 3017 (mostly ASCII). [issue #2258,
Expand Down
1 change: 1 addition & 0 deletions data/driver.list.in
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@
"Liebert" "ups" "3" "PowerSure PSA500MT3-230U" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/601
"Liebert" "ups" "3" "PowerSure PSI 1440" "USB" "usbhid-ups" # http://www.emersonnetworkpower.com/en-US/Products/ACPower/Pages/LiebertPowerSurePSILineInteractiveUPS10003000VA.aspx
"Liebert" "ups" "3" "PSI5-800RT120" "USB" "usbhid-ups" # https://www.vertiv.com/en-us/products-catalog/critical-power/uninterruptible-power-supplies-ups/psi5-800rt120/
"Liebert" "ups" "3" "PSI5-750MT120 (with IS-UNITY-DP SNMP card)" "" "snmp-ups" # https://github.com/networkupstools/nut/pull/3299

"LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)"

Expand Down
3 changes: 2 additions & 1 deletion docs/nut.dict
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
personal_ws-1.1 en 3654 utf-8
personal_ws-1.1 en 3655 utf-8
AAC
AAS
ABI
Expand Down Expand Up @@ -1475,6 +1475,7 @@ Valderen
Vdc
Velloso
VendorID
Vertiv
Viewpower
Viewsonic
Viktor
Expand Down
3 changes: 2 additions & 1 deletion drivers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ snmp_ups_SOURCES = snmp-ups.c snmp-ups-helpers.c \
mge-mib.c \
netvision-mib.c \
raritan-pdu-mib.c raritan-px2-mib.c \
vertiv-mib.c \
xppc-mib.c
snmp_ups_CFLAGS = $(AM_CFLAGS)
snmp_ups_CFLAGS += $(LIBNETSNMP_CFLAGS)
Expand Down Expand Up @@ -540,7 +541,7 @@ dist_noinst_HEADERS = \
nutdrv_qx_voltronic-axpert.h nutdrv_qx_voltronic-qs.h nutdrv_qx_voltronic-qs-hex.h \
nutdrv_qx_zinto.h \
upsdrvquery.h \
xppc-mib.h huawei-mib.h eaton-ats16-nmc-mib.h eaton-ats16-nm2-mib.h apc-ats-mib.h raritan-px2-mib.h eaton-ats30-mib.h \
xppc-mib.h huawei-mib.h eaton-ats16-nmc-mib.h eaton-ats16-nm2-mib.h apc-ats-mib.h raritan-px2-mib.h vertiv-mib.h eaton-ats30-mib.h \
apc-pdu-mib.h apc-epdu-mib.h ecoflow-hid.h ever-hid.h eaton-pdu-genesis2-mib.h eaton-pdu-marlin-mib.h eaton-pdu-marlin-helpers.h \
eaton-pdu-pulizzi-mib.h eaton-pdu-revelation-mib.h emerson-avocent-pdu-mib.h eaton-ups-pwnm2-mib.h eaton-ups-pxg-mib.h legrand-hid.h \
hpe-pdu-mib.h hpe-pdu3-cis-mib.h powervar-hid.h delta_ups-hid.h generic_modbus.h salicru-hid.h adelsystem_cbi.h eaton-pdu-nlogic-mib.h ydn23.h
Expand Down
4 changes: 3 additions & 1 deletion drivers/snmp-ups.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
#include "emerson-avocent-pdu-mib.h"
#include "hpe-pdu-mib.h"
#include "hpe-pdu3-cis-mib.h"
#include "vertiv-mib.h"

/* Address API change */
#if ( ! NUT_HAVE_LIBNETSNMP_usmAESPrivProtocol ) && ( ! defined usmAESPrivProtocol )
Expand Down Expand Up @@ -128,6 +129,7 @@ static mib2nut_info_t *mib2nut[] = {
&netvision, /* This struct comes from : netvision-mib.c */
&raritan, /* This struct comes from : raritan-pdu-mib.c */
&raritan_px2, /* This struct comes from : raritan-px2-mib.c */
&vertiv, /* This struct comes from : vertiv-mib.c */
&xppc, /* This struct comes from : xppc-mib.c */
/*
* Prepend vendor specific MIB mappings before IETF, so that
Expand Down Expand Up @@ -177,7 +179,7 @@ static const char *mibname;
static const char *mibvers;

#define DRIVER_NAME "Generic SNMP UPS driver"
#define DRIVER_VERSION "1.38"
#define DRIVER_VERSION "1.39"

/* driver description structure */
upsdrv_info_t upsdrv_info = {
Expand Down
174 changes: 174 additions & 0 deletions drivers/vertiv-mib.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/* vertiv-mib.h - Driver for Vertiv Liebert PSI5 UPS (maybe other Vertiv too)
*
* Copyright (C)
* 2026 jawz101 <jawz101@users.noreply.github.com> + Gemini
* 2026 Jim Klimov <jimklimov+nut@gmail.com> - cleanup
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Includes support for:
* - Basic Monitoring (Voltage, Load, Temperature)
* - Battery Management (Charge, Runtime)
* - Alarms (Replace Battery, Overload, etc.)
* - Beeper Control
*/

#include "vertiv-mib.h"

#define VERTIV_MIB_VERSION "0.01"

/* Base OIDs from IS-UNITY-DP Card */
#define VERTIV_BASEOID ".1.3.6.1.4.1.476.1.42"
#define VERTIV_ID_OID VERTIV_BASEOID ".2.4.2.1.4.1"
#define VERTIV_VAL_OID VERTIV_BASEOID ".3.9.30.1.20.1.2.1"
#define VERTIV_ALM_OID VERTIV_BASEOID ".3.9.20.1.10.1.2.100"
#define VERTIV_PWRSTATUS_OID VERTIV_BASEOID ".3.5.3"
#define VERTIV_BEEPER_OID VERTIV_VAL_OID ".6188"

#ifdef VERTIV_WITH_IETF_BEEPER_FALLBACK
/* May be defined in experimental builds */
static info_lkp_t ietf_beeper_status_info[] = {
info_lkp_default(1, "disabled"),
info_lkp_default(2, "enabled"),
info_lkp_default(3, "muted"),
info_lkp_sentinel
};
#endif /* VERTIV_WITH_IETF_BEEPER_FALLBACK */

static info_lkp_t vertiv_beeper_status_info[] = {
info_lkp_default(1, "enabled"),
info_lkp_default(2, "disabled"),
info_lkp_sentinel
};

/* FIXME: the below may introduce status redundancy, that needs to be
* addressed by the driver, as for usbhid-ups! */
/*
* DESCRIPTION
* The present source of output power. The enumeration
* none(2) indicates that there is no source of output
* power (and therefore no output power), for example,
* the system has opened the output breaker.
*
* NOTE: In a single-module system, this point
* is intended to have the same behavior as
* the RFC1628 point upsOutputSource."
*/
static info_lkp_t vertiv_power_source_info[] = {
info_lkp_default(1, ""), /* other */
info_lkp_default(2, "OFF"), /* none */
info_lkp_default(3, "OL"), /* normal */
info_lkp_default(4, "BYPASS"), /* bypass */
info_lkp_default(5, "OB"), /* battery */
info_lkp_default(6, "BOOST"), /* booster */
info_lkp_default(7, "TRIM"), /* reducer */
info_lkp_sentinel
};

static snmp_info_t vertiv_mib[] = {
/* Standard IETF MIB items */
snmp_info_default("device.description", ST_FLAG_STRING | ST_FLAG_RW, SU_INFOSIZE, ".1.3.6.1.2.1.1.1.0", NULL, SU_FLAG_OK | SU_FLAG_SEMI_STATIC, NULL),
snmp_info_default("device.contact", ST_FLAG_STRING | ST_FLAG_RW, SU_INFOSIZE, ".1.3.6.1.2.1.1.4.0", NULL, SU_FLAG_OK | SU_FLAG_SEMI_STATIC, NULL),
snmp_info_default("device.location", ST_FLAG_STRING | ST_FLAG_RW, SU_INFOSIZE, ".1.3.6.1.2.1.1.6.0", NULL, SU_FLAG_OK | SU_FLAG_SEMI_STATIC, NULL),

/* Device Identification from vendor MIB */
snmp_info_default("device.mfr", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".2.1.1.0", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("device.model", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".2.4.2.1.4.1", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("device.serial", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".2.4.2.1.7.1", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("ups.firmware", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".2.4.2.1.5.1", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),

/* Extended Identification */
snmp_info_default("device.type", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".3.9.20.1.20.1.2.1.4553", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("ups.mfr", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".3.9.20.1.20.1.2.1.4333", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("ups.model", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".3.9.20.1.20.1.2.1.4240", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),

/* UPS Measurements & Topology (High-precision) */
snmp_info_default("ups.load", 0, 1.0, VERTIV_VAL_OID ".5861", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("ups.temperature", 0, 1.0, VERTIV_BASEOID ".3.9.30.1.10.1.2.1.4291", NULL, SU_FLAG_NEGINVALID, NULL),
snmp_info_default("ups.type", ST_FLAG_STRING, 1.0, VERTIV_BASEOID ".3.9.20.1.20.1.2.1.6199", NULL, SU_FLAG_OK | SU_FLAG_STATIC, NULL),

/* Battery Data */
snmp_info_default("battery.charge", 0, 1.0, VERTIV_VAL_OID ".4153", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
/* Multiplier 60.0 converts UPS minutes to NUT seconds */
snmp_info_default("battery.runtime", 0, 60.0, VERTIV_VAL_OID ".4150", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("battery.voltage", 0, 1.0, VERTIV_VAL_OID ".4148", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("battery.voltage.nominal", 0, 1.0, VERTIV_VAL_OID ".6189", "", SU_FLAG_OK | SU_FLAG_STATIC, NULL),

/* Power Quality - Scaled (0.1) for high precision decimal values (tenths of Volts/Amps/Hz) */
snmp_info_default("input.voltage", 0, 0.1, VERTIV_VAL_OID ".4096", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("input.current", 0, 0.1, VERTIV_VAL_OID ".4113", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("input.frequency", 0, 0.1, VERTIV_VAL_OID ".4105", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("input.voltage.nominal", 0, 1.0, VERTIV_VAL_OID ".4102", "", SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("input.current.nominal", 0, 1.0, VERTIV_VAL_OID ".4104", "", SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("input.frequency.nominal", 0, 1.0, VERTIV_VAL_OID ".4103", "", SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("output.voltage", 0, 0.1, VERTIV_VAL_OID ".4385", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("output.current", 0, 0.1, VERTIV_VAL_OID ".4204", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("output.frequency", 0, 0.1, VERTIV_VAL_OID ".4207", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("output.power", 0, 1.0, VERTIV_VAL_OID ".4208", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("output.power.apparent", 0, 1.0, VERTIV_VAL_OID ".4209", "", SU_FLAG_OK | SU_FLAG_NEGINVALID, NULL),
snmp_info_default("output.voltage.nominal", 0, 1.0, VERTIV_VAL_OID ".4260", "", SU_FLAG_OK | SU_FLAG_STATIC, NULL),
snmp_info_default("output.power.nominal", 0, 1.0, VERTIV_VAL_OID ".4264", "", SU_FLAG_OK | SU_FLAG_STATIC, NULL),

/* UPS Status */
snmp_info_default("ups.status", ST_FLAG_STRING, SU_INFOSIZE, VERTIV_VAL_OID ".4872", "", SU_STATUS_PWR | SU_FLAG_OK, vertiv_power_source_info),

/* Beeper status and commands */
snmp_info_default("ups.beeper.status", ST_FLAG_STRING, SU_INFOSIZE, VERTIV_BEEPER_OID, "", SU_FLAG_UNIQUE, vertiv_beeper_status_info),

snmp_info_default("beeper.disable", 0, 1, VERTIV_BEEPER_OID, "2", SU_TYPE_CMD, NULL),
snmp_info_default("beeper.enable", 0, 1, VERTIV_BEEPER_OID, "1", SU_TYPE_CMD, NULL),

#ifdef VERTIV_WITH_IETF_BEEPER_FALLBACK
/* IETF MIB fallback */
snmp_info_default("ups.beeper.status", ST_FLAG_STRING, SU_INFOSIZE, "1.3.6.1.2.1.33.1.9.8.0", "", SU_FLAG_UNIQUE, ietf_beeper_status_info),
#if 0
snmp_info_default("beeper.disable", 0, 1, "1.3.6.1.2.1.33.1.9.8.0", "1", SU_TYPE_CMD, NULL),
snmp_info_default("beeper.enable", 0, 1, "1.3.6.1.2.1.33.1.9.8.0", "2", SU_TYPE_CMD, NULL),
#endif
snmp_info_default("beeper.mute", 0, 1, "1.3.6.1.2.1.33.1.9.8.0", "3", SU_TYPE_CMD, NULL),
#endif /* VERTIV_WITH_IETF_BEEPER_FALLBACK */

/* Shutdown / Restart Control
* NOTE: Other sources suggest
* "ups.delay.shutdown" => VERTIV_BASEOID ".3.3.5.1.0"
* "ups.delay.start" => VERTIV_BASEOID ".3.3.5.2.0"
*/
snmp_info_default("ups.delay.shutdown", ST_FLAG_RW, 1.0, VERTIV_VAL_OID ".5814", "", SU_TYPE_TIME | SU_FLAG_OK, NULL),
snmp_info_default("ups.delay.start", ST_FLAG_RW, 1.0, VERTIV_VAL_OID ".5816", "", SU_TYPE_TIME | SU_FLAG_OK, NULL),

/* end of structure. */
snmp_info_sentinel
};

static alarms_info_t vertiv_alarms[] = {
{ VERTIV_ALM_OID ".4168", "OB", "Battery Discharging" },
{ VERTIV_ALM_OID ".4162", "LB", "Battery Low" },
{ VERTIV_ALM_OID ".5806", "OVER", "Output Overload" },
{ VERTIV_ALM_OID ".6182", "RB", "Replace Battery" },
{ VERTIV_ALM_OID ".4233", "FAULT", "Inverter Failure" },
{ VERTIV_ALM_OID ".4310", "OT", "Over Temperature" },
{ VERTIV_ALM_OID ".4215", "OFF", "UPS Output Off" },
{ NULL, NULL, NULL }
};

mib2nut_info_t vertiv = {
"vertiv",
VERTIV_MIB_VERSION,
VERTIV_PWRSTATUS_OID,/* Optional Power Status OID */
VERTIV_ID_OID, /* Model Name OID */
vertiv_mib,
VERTIV_BASEOID, /* SysOID fingerprint */
vertiv_alarms
};
30 changes: 30 additions & 0 deletions drivers/vertiv-mib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* vertiv-psi5-mib.h - Driver for Vertiv Liebert PSI5 UPS
*
* Copyright (C)
* 2026 jawz101 <jawz101@users.noreply.github.com> + Gemini
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/

#ifndef VERTIV_PSI5_MIB_H
#define VERTIV_PSI5_MIB_H

#include "main.h"
#include "snmp-ups.h"

extern mib2nut_info_t vertiv;

#endif /* VERTIV_PSI5_MIB_H */
Loading