/* liebert300mib.h - data to monitor some of the Liebert AP300 UPS equipped * with SNMP card/external box with NUT * * changes from Andrew Fleming, Washburn University * Topeka, KS 9/06/2007 for use with Liebert AP300 UPS * Copyright (C) 2004 * Thanos Chatziathanassiou * * 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 * */ #define LIEBERT_MIB_VERSION "2.2" /* SNMP OIDs set */ #define LIEBERT_OID_UPS_MIB ".1.3.6.1.4.1.476.1.1.1.1" #define LIEBERT_OID_UPSIDENTMODEL ".1.3.6.1.4.1.476.1.1.1.1.1.2.0" #define LIEBERT_OID_UPSIDENTAGENTSWVERSION ".1.3.6.1.4.1.476.1.1.1.1.1.3.0" /* UPS Alarm */ #define LIEBERT_OID_ALARMSTATUS ".1.3.6.1.4.1.476.1.1.1.1.6.3.0" info_lkp_t LIEBERT_batt_info[] = { { 1, "LB" }, /* Low Battery Warning */ { 2, "OFF" }, /* Low Battery Shutdown */ { 3, "OB" }, /* Util Fail */ { 4, "" }, /* Over Temp Warning */ { 6, "OVER" }, /* Output Overload Warning */ { 8, "TRIM" }, /* Input Over Voltage */ { 9, "RB" }, /* Battery Bad */ { 10, "OB" }, /* On Battery */ { 12, "OFF" }, /* UPS OFF */ { 0, "NULL" } }; #define LIEBERT_OID_BATT_RUNTIME_REMAINING ".1.3.6.1.4.1.476.1.1.1.1.2.1.0" #define LIEBERT_OID_BATT_VOLTS ".1.3.6.1.4.1.476.1.1.1.1.2.3.0" #define LIEBERT_OID_INPUT_NUM_LINES ".1.3.6.1.4.1.476.1.1.1.1.3.5.0" /* 1phase or 3phase UPS input */ #define LIEBERT_OID_OUTPUT_NUM_LINES ".1.3.6.1.4.1.476.1.1.1.1.4.3.0" /* 1phase or 3phase UPS output */ /* three phase ups provide input/output/load for each phase in case of one-phase output, only _P1 should be used */ #define LIEBERT_OID_OUT_VOLTAGE_P1 ".1.3.6.1.4.1.476.1.1.1.1.4.4.1.2.1" #define LIEBERT_OID_OUT_CURRENT_P1 ".1.3.6.1.4.1.476.1.1.1.1.4.4.1.3.1" #define LIEBERT_OID_IN_VOLTAGE_P1 ".1.3.6.1.4.1.476.1.1.1.1.3.6.1.2.1" #define LIEBERT_OID_OUT_VOLTAGE_P2 ".1.3.6.1.4.1.476.1.1.1.1.4.4.1.2.2" #define LIEBERT_OID_OUT_CURRENT_P2 ".1.3.6.1.4.1.476.1.1.1.1.4.4.1.3.2" #define LIEBERT_OID_IN_VOLTAGE_P2 ".1.3.6.1.4.1.476.1.1.1.1.3.6.1.2.2" #define LIEBERT_OID_OUT_VOLTAGE_P3 ".1.3.6.1.4.1.476.1.1.1.1.4.4.1.2.3" #define LIEBERT_OID_OUT_CURRENT_P3 ".1.3.6.1.4.1.476.1.1.1.1.4.4.1.3.3" #define LIEBERT_OID_IN_VOLTAGE_P3 ".1.3.6.1.4.1.476.1.1.1.1.3.6.1.2.3" /* Snmp2NUT lookup table */ snmp_info_t liebert_mib[] = { { "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, LIEBERT_OID_UPSIDENTAGENTSWVERSION, "Liebert UPS", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "ups.model", ST_FLAG_STRING, SU_INFOSIZE, LIEBERT_OID_UPSIDENTMODEL, "Generic SNMP UPS", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "ups.firmware.aux", ST_FLAG_STRING, SU_INFOSIZE, LIEBERT_OID_UPSIDENTAGENTSWVERSION, "", SU_FLAG_STATIC | SU_FLAG_OK, NULL }, { "ups.status", ST_FLAG_STRING, SU_INFOSIZE, LIEBERT_OID_ALARMSTATUS, "", SU_FLAG_OK | SU_STATUS_BATT, &LIEBERT_batt_info[0] }, /*ups input,output voltage, output frquency phase 1 */ { "input.voltage", 0, 1.0, LIEBERT_OID_IN_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, { "output.voltage", 0, 1.0, LIEBERT_OID_OUT_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, { "output.current", 0, 1.0, LIEBERT_OID_OUT_CURRENT_P1, 0, SU_FLAG_OK, NULL }, /* battery info */ { "battery.voltage", 0, 1.0, LIEBERT_OID_BATT_VOLTS, "", SU_FLAG_OK, NULL }, { "battery.runtime", 0, 1.0, LIEBERT_OID_BATT_RUNTIME_REMAINING, "", SU_FLAG_OK, NULL }, /* end of structure. */ { NULL, 0, 0, NULL, NULL, 0, NULL } };