1
/* pwmib.h - data to monitor Powerware UPS with NUT
2
* (using MIBs described in stdupsv1.mib and Xups.mib)
5
* Olli Savia <ops@iki.fi>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
#define PW_MIB_VERSION "0.1"
26
#define PW_OID_MANUFACTURER ".1.3.6.1.2.1.33.1.1.1"
27
#define PW_OID_MODEL ".1.3.6.1.2.1.33.1.1.2"
28
#define PW_OID_SOFTWARE_VERSION ".1.3.6.1.2.1.33.1.1.3"
29
#define PW_OID_AGENT_SOFTWARE_VERSION ".1.3.6.1.2.1.33.1.1.4"
31
#define PW_OID_BATTERY_STATUS ".1.3.6.1.4.1.534.1.2.5" /* Xups.mib */
32
#define PW_OID_BATTERY_MINUTES_REMAINING ".1.3.6.1.2.1.33.1.2.3"
33
#define PW_OID_BATTERY_CHARGE_REMAINING ".1.3.6.1.2.1.33.1.2.4"
34
#define PW_OID_BATTERY_VOLTAGE ".1.3.6.1.2.1.33.1.2.5"
36
#define PW_OID_IN_FREQUENCY ".1.3.6.1.2.1.33.1.3.3.1.2"
37
#define PW_OID_IN_VOLTAGE ".1.3.6.1.2.1.33.1.3.3.1.3"
39
#define PW_OID_OUT_FREQUENCY ".1.3.6.1.2.1.33.1.4.2"
40
#define PW_OID_OUT_VOLTAGE ".1.3.6.1.2.1.33.1.4.4.1.2"
41
#define PW_OID_OUT_CURRENT ".1.3.6.1.2.1.33.1.4.4.1.3"
42
#define PW_OID_OUT_POWER ".1.3.6.1.2.1.33.1.4.4.1.4"
43
#define PW_OID_OUT_PERCENTLOAD ".1.3.6.1.2.1.33.1.4.4.1.5"
45
#define PW_OID_AMBIENT_TEMP ".1.3.6.1.4.1.534.1.6.1" /* Xups.mib */
48
/* Defines for PW_OID_BATTERY_STATUS */
49
info_lkp_t pw_batt_info[] = {
59
/* Snmp2NUT lookup table */
61
snmp_info_t pw_mib[] = {
63
{ "ups.firmware", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_SOFTWARE_VERSION, "", SU_FLAG_STATIC | SU_FLAG_OK, NULL },
64
{ "ups.firmware.aux", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_AGENT_SOFTWARE_VERSION, "", SU_FLAG_STATIC | SU_FLAG_OK, NULL },
65
{ "ups.load", 0, 1.0, PW_OID_OUT_PERCENTLOAD, "", SU_FLAG_OK, NULL },
66
{ "ups.mfr", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_MANUFACTURER, "", SU_FLAG_STATIC | SU_FLAG_OK, NULL },
67
{ "ups.model", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_MODEL, "", SU_FLAG_STATIC | SU_FLAG_OK, NULL },
68
{ "ups.power", 0, 1.0, PW_OID_OUT_POWER, "", SU_FLAG_OK, NULL },
69
{ "ups.status", ST_FLAG_STRING, SU_INFOSIZE, PW_OID_BATTERY_STATUS, "", SU_FLAG_OK | SU_STATUS_BATT, &pw_batt_info[0] },
71
{ "battery.charge", 0, 1.0, PW_OID_BATTERY_CHARGE_REMAINING, "", SU_FLAG_OK, NULL },
72
{ "battery.runtime", 0, 60.0, PW_OID_BATTERY_MINUTES_REMAINING, "", SU_FLAG_OK, NULL },
73
{ "battery.voltage", 0, 0.1, PW_OID_BATTERY_VOLTAGE, "", SU_FLAG_OK, NULL },
75
{ "output.current", 0, 1.0, PW_OID_OUT_CURRENT, "", SU_FLAG_OK, NULL },
76
{ "output.frequency", 0, 0.1, PW_OID_OUT_FREQUENCY, "", SU_FLAG_OK, NULL },
77
{ "output.voltage", 0, 1.0, PW_OID_OUT_VOLTAGE, "", SU_FLAG_OK, NULL },
79
{ "input.frequency", 0, 0.1, PW_OID_IN_FREQUENCY, "", SU_FLAG_OK, NULL },
80
{ "input.voltage", 0, 1.0, PW_OID_IN_VOLTAGE, "", SU_FLAG_OK, NULL },
82
{ "ambient.temperature", 0, 1.0, PW_OID_AMBIENT_TEMP, "", SU_FLAG_OK, NULL },
83
/* end of structure. */
84
{ NULL, 0, 0, NULL, NULL, 0, NULL }