Révision 17f78427
Whitespace cleanup
- remove trailing whitespace
- remove empty lines at the end of files
| plugins/power/snmp__ipoman_ | ||
|---|---|---|
| 3 | 3 |
# What is snmp__ipoman_ |
| 4 | 4 |
# ---------------------- |
| 5 | 5 |
# snmp__ipoman is a munin plugin written for the Ingrasys IpomanII 1202 |
| 6 |
# Power Distribution Unit. It should work on any PDU conforming to
|
|
| 7 |
# the IPOMANII-MIB.
|
|
| 6 |
# Power Distribution Unit. It should work on any PDU conforming to |
|
| 7 |
# the IPOMANII-MIB. |
|
| 8 | 8 |
# |
| 9 | 9 |
# How do I use it |
| 10 | 10 |
# --------------- |
| ... | ... | |
| 12 | 12 |
# how: |
| 13 | 13 |
# |
| 14 | 14 |
# 1. Copy snmp__ipoman_ to the directory where all your munin plugins |
| 15 |
# reside, for example /usr/share/munin/plugins.
|
|
| 15 |
# reside, for example /usr/share/munin/plugins. |
|
| 16 | 16 |
# |
| 17 | 17 |
# 2. Make the following symlinks to snmp__ipoman_ in that same directory |
| 18 | 18 |
# |
| ... | ... | |
| 40 | 40 |
# output current and power usage for all available outlets of the |
| 41 | 41 |
# ipoman, and current, power usage and voltage/frequency on all inlets |
| 42 | 42 |
# of the ipoman. |
| 43 |
#
|
|
| 43 |
# |
|
| 44 | 44 |
# 5. Restart munin-node |
| 45 | 45 |
# |
| 46 | 46 |
# 6. Make an entry in your munin server's munin.conf: |
| ... | ... | |
| 48 | 48 |
# [<hostname of ipoman as entered in 4.>] |
| 49 | 49 |
# address <address of munin-node> |
| 50 | 50 |
# use_node_name no |
| 51 |
#
|
|
| 51 |
# |
|
| 52 | 52 |
# 7. Done. |
| 53 | 53 |
# |
| 54 | 54 |
# Copyright (C) 2009 Rien Broekstra <rien@rename-it.nl> |
| ... | ... | |
| 67 | 67 |
# along with this program; if not, write to the Free Software |
| 68 | 68 |
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 69 | 69 |
# |
| 70 |
# Munin plugin to monitor power consumption and current of the sockets of an
|
|
| 71 |
# Ingrasys IpomanII 1202 Power Distribution Unit, or any power distribution
|
|
| 70 |
# Munin plugin to monitor power consumption and current of the sockets of an |
|
| 71 |
# Ingrasys IpomanII 1202 Power Distribution Unit, or any power distribution |
|
| 72 | 72 |
# unit that conforms to IPOMANII-MIB via SNMP. |
| 73 | 73 |
# |
| 74 | 74 |
# Parameters: |
| 75 | 75 |
# |
| 76 |
# config
|
|
| 77 |
# snmpconf
|
|
| 76 |
# config |
|
| 77 |
# snmpconf |
|
| 78 | 78 |
# |
| 79 | 79 |
# Relevant OID's under .iso.org.dod.internet.private.enterprises.ingrasys.product.pduAgent.iPoManII |
| 80 | 80 |
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletNumber.0 |
| 81 | 81 |
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusIndex.1 |
| 82 | 82 |
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusCurrent.1 |
| 83 | 83 |
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusKwatt.1 |
| 84 |
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusWH.1
|
|
| 84 |
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusWH.1 |
|
| 85 | 85 |
# |
| 86 | 86 |
# Version 0.1, Aug 4, 2009 |
| 87 | 87 |
# |
| ... | ... | |
| 134 | 134 |
# |
| 135 | 135 |
# The relevant OID's on the IPOMAN |
| 136 | 136 |
# |
| 137 |
my $oid_inletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.1.0";
|
|
| 138 |
my $oid_inletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.2.1.1.";
|
|
| 137 |
my $oid_inletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.1.0"; |
|
| 138 |
my $oid_inletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.2.1.1."; |
|
| 139 | 139 |
my $oid_inletvoltage = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.2."; |
| 140 | 140 |
my $oid_inletcurrent = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.3."; |
| 141 | 141 |
my $oid_inletfrequency = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.4."; |
| 142 | 142 |
my $oid_inletenergy = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.5."; |
| 143 | 143 |
|
| 144 |
my $oid_outletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.1.0";
|
|
| 145 |
my $oid_outletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.1.";
|
|
| 144 |
my $oid_outletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.1.0"; |
|
| 145 |
my $oid_outletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.1."; |
|
| 146 | 146 |
my $oid_outletdescription = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.2.1.2."; |
| 147 | 147 |
my $oid_outletcurrent = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.3."; |
| 148 | 148 |
my $oid_outletenergy = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.4."; |
| ... | ... | |
| 219 | 219 |
print "graph_args --base 1000 -l 0\n"; |
| 220 | 220 |
print "graph_category sensors\n"; |
| 221 | 221 |
print "graph_info This graph shows the tension and frequency to inlet $socketnumber on the Power Distribution Unit\n"; |
| 222 |
|
|
| 222 |
|
|
| 223 | 223 |
print "voltage.label Tension (V)\n"; |
| 224 | 224 |
print "voltage.draw LINE2\n"; |
| 225 | 225 |
print "voltage.type GAUGE\n"; |
| ... | ... | |
| 235 | 235 |
print "graph_args --base 1000 -l 0\n"; |
| 236 | 236 |
print "graph_category sensors\n"; |
| 237 | 237 |
print "graph_info This graph shows the delivered current to inlet $socketnumber on the Power Distribution Unit\n"; |
| 238 |
|
|
| 238 |
|
|
| 239 | 239 |
print "current.label Current (A)\n"; |
| 240 | 240 |
print "current.draw AREA\n"; |
| 241 | 241 |
print "current.type GAUGE\n"; |
| ... | ... | |
| 247 | 247 |
print "graph_args --base 1000 -l 0\n"; |
| 248 | 248 |
print "graph_category sensors\n"; |
| 249 | 249 |
print "graph_info This graph shows the delivered apparent and real power to inlet $socketnumber of the Power Distribution Unit\n"; |
| 250 |
|
|
| 250 |
|
|
| 251 | 251 |
print "apparentpower.label Apparent power (kVA)\n"; |
| 252 | 252 |
print "apparentpower.draw LINE3\n"; |
| 253 | 253 |
print "apparentpower.type GAUGE\n"; |
| 254 |
|
|
| 254 |
|
|
| 255 | 255 |
print "realpower.label Real power (kW)\n"; |
| 256 | 256 |
print "realpower.draw AREA\n"; |
| 257 | 257 |
print "realpower.type COUNTER\n"; |
| 258 |
|
|
| 258 |
|
|
| 259 | 259 |
exit 0; |
| 260 | 260 |
} |
| 261 | 261 |
elsif ($graphtype eq "outletcurrent") {
|
| 262 | 262 |
print "graph_title Outlet $socketnumber current\n"; |
| 263 |
|
|
| 263 |
|
|
| 264 | 264 |
print "graph_args --base 1000 -l 0\n"; |
| 265 | 265 |
print "graph_category sensors\n"; |
| 266 | 266 |
print "graph_info This graph shows the delivered current to outlet $socketnumber of the Power Distribution Unit\n"; |
| 267 |
|
|
| 267 |
|
|
| 268 | 268 |
print "current.label Delivered current (A)\n"; |
| 269 | 269 |
print "current.draw AREA\n"; |
| 270 | 270 |
print "current.type GAUGE\n"; |
| 271 | 271 |
} |
| 272 | 272 |
elsif ($graphtype eq "outletpower") {
|
| 273 | 273 |
print "graph_title Outlet $socketnumber power\n"; |
| 274 |
|
|
| 274 |
|
|
| 275 | 275 |
print "graph_args --base 1000 -l 0\n"; |
| 276 | 276 |
print "graph_category sensors\n"; |
| 277 | 277 |
print "graph_info This graph shows the delivered apparent and real power to outlet $socketnumber of the Power Distribution Unit\n"; |
| 278 |
|
|
| 278 |
|
|
| 279 | 279 |
print "apparentpower.label Apparent power (kVA)\n"; |
| 280 | 280 |
print "apparentpower.draw LINE3\n"; |
| 281 | 281 |
print "apparentpower.type GAUGE\n"; |
| 282 |
|
|
| 282 |
|
|
| 283 | 283 |
print "realpower.label Real power (kW)\n"; |
| 284 | 284 |
print "realpower.draw AREA\n"; |
| 285 | 285 |
print "realpower.type COUNTER\n"; |
| 286 |
|
|
| 286 |
|
|
| 287 | 287 |
exit 0; |
| 288 | 288 |
} |
| 289 | 289 |
exit 0; |
| ... | ... | |
| 342 | 342 |
} |
| 343 | 343 |
elsif ($graphtype eq "inletpower") {
|
| 344 | 344 |
my ($current, $energy, $voltage, $apparentpower); |
| 345 |
|
|
| 345 |
|
|
| 346 | 346 |
if (defined ($response = $session->get_request($oid_inletcurrent.$socketnumber))) {
|
| 347 | 347 |
$current = $response->{$oid_inletcurrent.$socketnumber};
|
| 348 | 348 |
} |
| ... | ... | |
| 402 | 402 |
} |
| 403 | 403 |
elsif ($graphtype eq "outletpower") {
|
| 404 | 404 |
my ($current, $energy, $voltage, $apparentpower); |
| 405 |
|
|
| 405 |
|
|
| 406 | 406 |
if (defined ($response = $session->get_request($oid_outletcurrent.$socketnumber))) {
|
| 407 | 407 |
$current = $response->{$oid_outletcurrent.$socketnumber};
|
| 408 | 408 |
} |
Formats disponibles : Unified diff