mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -208,14 +208,14 @@ munin plugin to monitor APC UPS via apcupsd by apcaccess.
|
|||
=head1 INSTALLATION
|
||||
|
||||
cp apcupsd_pct $MUNIN_LIBDIR/plugsin/
|
||||
|
||||
|
||||
cd YOUR_MUNIN_PLUGINS_DIR
|
||||
(make symbolic links different name)
|
||||
ln -s $MUNIN_LIBDIR/plugsin/apcupsd_pct apcupsd_pct
|
||||
ln -s $MUNIN_LIBDIR/plugsin/apcupsd_pct apcupsd_volt
|
||||
ln -s $MUNIN_LIBDIR/plugsin/apcupsd_pct apcupsd_time
|
||||
ln -s $MUNIN_LIBDIR/plugsin/apcupsd_pwr apcupsd_pwr
|
||||
|
||||
|
||||
restart munin-node
|
||||
|
||||
=head1 REPOSITORY
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#!/usr/bin/perl -w
|
||||
#
|
||||
#
|
||||
# Plugin to monitor apcupsd via apcaccess
|
||||
#
|
||||
# Version 1.3
|
||||
#
|
||||
#
|
||||
# Copyright (C) 2005-2008 Behan Webster <behanw AT websterwood DOT com>
|
||||
# Licenced under GPL 2.0
|
||||
#
|
||||
# Written by: Behan Webster <behanw AT websterwood DOT com>
|
||||
# German translation by: Bianco Veigel <bianco.veigel AT zivillian DOT de>
|
||||
#
|
||||
#
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
|
@ -28,7 +28,7 @@ my $language = $ENV{LANG} || 'en';
|
|||
#
|
||||
# UPSNAME : Elfhild
|
||||
# MODEL : SMART-UPS 1400 RM XL
|
||||
# STATUS : ONLINE
|
||||
# STATUS : ONLINE
|
||||
# LINEV : 123.5 Volts
|
||||
# LOADPCT : 24.9 Percent Load Capacity
|
||||
# BCHARGE : 100.0 Percent
|
||||
|
|
|
@ -314,8 +314,8 @@ As per L<http://cumbers.wordpress.com/2008/05/07/breakdown-of-currentcost-xml-ou
|
|||
<date>
|
||||
<dsb>00014</dsb> days since birth
|
||||
<hr>14</hr> the time
|
||||
<min>07</min>
|
||||
<sec>07</sec>
|
||||
<min>07</min>
|
||||
<sec>07</sec>
|
||||
</date>
|
||||
<src>
|
||||
<name>CC02</name> name of this device
|
||||
|
@ -336,71 +336,71 @@ As per L<http://cumbers.wordpress.com/2008/05/07/breakdown-of-currentcost-xml-ou
|
|||
<hist>
|
||||
<hrs>
|
||||
<h02>000.0</h02> total Kwh used in 2 hour blocks
|
||||
<h04>000.1</h04>
|
||||
<h06>000.1</h06>
|
||||
<h08>000.0</h08>
|
||||
<h10>000.0</h10>
|
||||
<h12>000.0</h12>
|
||||
<h14>000.0</h14>
|
||||
<h16>000.1</h16>
|
||||
<h18>000.1</h18>
|
||||
<h20>000.1</h20>
|
||||
<h22>000.1</h22>
|
||||
<h24>000.0</h24>
|
||||
<h26>000.0</h26>
|
||||
<h04>000.1</h04>
|
||||
<h06>000.1</h06>
|
||||
<h08>000.0</h08>
|
||||
<h10>000.0</h10>
|
||||
<h12>000.0</h12>
|
||||
<h14>000.0</h14>
|
||||
<h16>000.1</h16>
|
||||
<h18>000.1</h18>
|
||||
<h20>000.1</h20>
|
||||
<h22>000.1</h22>
|
||||
<h24>000.0</h24>
|
||||
<h26>000.0</h26>
|
||||
</hrs>
|
||||
<days>
|
||||
<d01>0000</d01> total Kwh used per day(s)
|
||||
<d02>0000</d02>
|
||||
<d03>0000</d03>
|
||||
<d04>0000</d04>
|
||||
<d05>0000</d05>
|
||||
<d06>0000</d06>
|
||||
<d07>0000</d07>
|
||||
<d08>0000</d08>
|
||||
<d09>0000</d09>
|
||||
<d10>0000</d10>
|
||||
<d11>0000</d11>
|
||||
<d12>0000</d12>
|
||||
<d13>0000</d13>
|
||||
<d14>0000</d14>
|
||||
<d15>0000</d15>
|
||||
<d16>0000</d16>
|
||||
<d17>0000</d17>
|
||||
<d18>0000</d18>
|
||||
<d19>0000</d19>
|
||||
<d20>0000</d20>
|
||||
<d21>0000</d21>
|
||||
<d22>0000</d22>
|
||||
<d23>0000</d23>
|
||||
<d24>0000</d24>
|
||||
<d25>0000</d25>
|
||||
<d26>0000</d26>
|
||||
<d27>0000</d27>
|
||||
<d28>0000</d28>
|
||||
<d29>0000</d29>
|
||||
<d30>0000</d30>
|
||||
<d31>0000</d31>
|
||||
<d02>0000</d02>
|
||||
<d03>0000</d03>
|
||||
<d04>0000</d04>
|
||||
<d05>0000</d05>
|
||||
<d06>0000</d06>
|
||||
<d07>0000</d07>
|
||||
<d08>0000</d08>
|
||||
<d09>0000</d09>
|
||||
<d10>0000</d10>
|
||||
<d11>0000</d11>
|
||||
<d12>0000</d12>
|
||||
<d13>0000</d13>
|
||||
<d14>0000</d14>
|
||||
<d15>0000</d15>
|
||||
<d16>0000</d16>
|
||||
<d17>0000</d17>
|
||||
<d18>0000</d18>
|
||||
<d19>0000</d19>
|
||||
<d20>0000</d20>
|
||||
<d21>0000</d21>
|
||||
<d22>0000</d22>
|
||||
<d23>0000</d23>
|
||||
<d24>0000</d24>
|
||||
<d25>0000</d25>
|
||||
<d26>0000</d26>
|
||||
<d27>0000</d27>
|
||||
<d28>0000</d28>
|
||||
<d29>0000</d29>
|
||||
<d30>0000</d30>
|
||||
<d31>0000</d31>
|
||||
</days>
|
||||
<mths>
|
||||
<m01>0000</m01> total Kwh used per month(s)
|
||||
<m02>0000</m02>
|
||||
<m03>0000</m03>
|
||||
<m04>0000</m04>
|
||||
<m05>0000</m05>
|
||||
<m06>0000</m06>
|
||||
<m07>0000</m07>
|
||||
<m08>0000</m08>
|
||||
<m09>0000</m09>
|
||||
<m10>0000</m10>
|
||||
<m11>0000</m11>
|
||||
<m12>0000</m12>
|
||||
<m02>0000</m02>
|
||||
<m03>0000</m03>
|
||||
<m04>0000</m04>
|
||||
<m05>0000</m05>
|
||||
<m06>0000</m06>
|
||||
<m07>0000</m07>
|
||||
<m08>0000</m08>
|
||||
<m09>0000</m09>
|
||||
<m10>0000</m10>
|
||||
<m11>0000</m11>
|
||||
<m12>0000</m12>
|
||||
</mths>
|
||||
<yrs>
|
||||
<y1>0000000</y1> total Kwh used per year(s)
|
||||
<y2>0000000</y2>
|
||||
<y3>0000000</y3>
|
||||
<y4>0000000</y4>
|
||||
<y2>0000000</y2>
|
||||
<y3>0000000</y3>
|
||||
<y4>0000000</y4>
|
||||
</yrs>
|
||||
</hist>
|
||||
</msg>
|
||||
|
@ -427,7 +427,7 @@ For full definition, see L<http://www.currentcost.com/xx128/xml.html>
|
|||
<watts>00000</watts>
|
||||
</ch3>
|
||||
</msg> end of message
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
sub collect_cc128_data {
|
||||
|
|
|
@ -41,7 +41,7 @@ load=$(upsc $UPS | grep ups.load: | cut -d" " -f2)
|
|||
charge=$(upsc $UPS | grep battery.charge: | cut -d" " -f2)
|
||||
}
|
||||
|
||||
# Munin routines
|
||||
# Munin routines
|
||||
case "$1" in
|
||||
autoconf)
|
||||
grep ^MONITOR < /etc/nut/upsmon.conf &> /dev/null
|
||||
|
@ -78,8 +78,8 @@ EOM
|
|||
grep ^MONITOR < /etc/nut/upsmon.conf | cut -d" " -f2 | sed 's|@|_AT_|g'
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
|
||||
*)
|
||||
|
||||
FETCH_DATA
|
||||
# Print data for Munin
|
||||
cat << EOM
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# What is snmp__ipoman_
|
||||
# ----------------------
|
||||
# snmp__ipoman is a munin plugin written for the Ingrasys IpomanII 1202
|
||||
# Power Distribution Unit. It should work on any PDU conforming to
|
||||
# the IPOMANII-MIB.
|
||||
# Power Distribution Unit. It should work on any PDU conforming to
|
||||
# the IPOMANII-MIB.
|
||||
#
|
||||
# How do I use it
|
||||
# ---------------
|
||||
|
@ -12,7 +12,7 @@
|
|||
# how:
|
||||
#
|
||||
# 1. Copy snmp__ipoman_ to the directory where all your munin plugins
|
||||
# reside, for example /usr/share/munin/plugins.
|
||||
# reside, for example /usr/share/munin/plugins.
|
||||
#
|
||||
# 2. Make the following symlinks to snmp__ipoman_ in that same directory
|
||||
#
|
||||
|
@ -40,7 +40,7 @@
|
|||
# output current and power usage for all available outlets of the
|
||||
# ipoman, and current, power usage and voltage/frequency on all inlets
|
||||
# of the ipoman.
|
||||
#
|
||||
#
|
||||
# 5. Restart munin-node
|
||||
#
|
||||
# 6. Make an entry in your munin server's munin.conf:
|
||||
|
@ -48,7 +48,7 @@
|
|||
# [<hostname of ipoman as entered in 4.>]
|
||||
# address <address of munin-node>
|
||||
# use_node_name no
|
||||
#
|
||||
#
|
||||
# 7. Done.
|
||||
#
|
||||
# Copyright (C) 2009 Rien Broekstra <rien@rename-it.nl>
|
||||
|
@ -67,21 +67,21 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# Munin plugin to monitor power consumption and current of the sockets of an
|
||||
# Ingrasys IpomanII 1202 Power Distribution Unit, or any power distribution
|
||||
# Munin plugin to monitor power consumption and current of the sockets of an
|
||||
# Ingrasys IpomanII 1202 Power Distribution Unit, or any power distribution
|
||||
# unit that conforms to IPOMANII-MIB via SNMP.
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config
|
||||
# snmpconf
|
||||
# config
|
||||
# snmpconf
|
||||
#
|
||||
# Relevant OID's under .iso.org.dod.internet.private.enterprises.ingrasys.product.pduAgent.iPoManII
|
||||
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletNumber.0
|
||||
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusIndex.1
|
||||
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusCurrent.1
|
||||
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusKwatt.1
|
||||
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusWH.1
|
||||
# .ipmObjects.ipmDevice.ipmDeviceOutlet.ipmDeviceOutletStatusTable.ipmDeviceOutletStatusEntry.outletStatusWH.1
|
||||
#
|
||||
# Version 0.1, Aug 4, 2009
|
||||
#
|
||||
|
@ -134,15 +134,15 @@ if (!defined($graphtype)) {
|
|||
#
|
||||
# The relevant OID's on the IPOMAN
|
||||
#
|
||||
my $oid_inletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.1.0";
|
||||
my $oid_inletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.2.1.1.";
|
||||
my $oid_inletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.1.0";
|
||||
my $oid_inletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.2.1.1.";
|
||||
my $oid_inletvoltage = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.2.";
|
||||
my $oid_inletcurrent = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.3.";
|
||||
my $oid_inletfrequency = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.4.";
|
||||
my $oid_inletenergy = ".1.3.6.1.4.1.2468.1.4.2.1.3.1.3.1.5.";
|
||||
|
||||
my $oid_outletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.1.0";
|
||||
my $oid_outletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.1.";
|
||||
my $oid_outletnumber = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.1.0";
|
||||
my $oid_outletindextable = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.1.";
|
||||
my $oid_outletdescription = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.2.1.2.";
|
||||
my $oid_outletcurrent = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.3.";
|
||||
my $oid_outletenergy = ".1.3.6.1.4.1.2468.1.4.2.1.3.2.3.1.4.";
|
||||
|
@ -219,7 +219,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "config") {
|
|||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category sensors\n";
|
||||
print "graph_info This graph shows the tension and frequency to inlet $socketnumber on the Power Distribution Unit\n";
|
||||
|
||||
|
||||
print "voltage.label Tension (V)\n";
|
||||
print "voltage.draw LINE2\n";
|
||||
print "voltage.type GAUGE\n";
|
||||
|
@ -235,7 +235,7 @@ if (defined $ARGV[0] and $ARGV[0] eq "config") {
|
|||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category sensors\n";
|
||||
print "graph_info This graph shows the delivered current to inlet $socketnumber on the Power Distribution Unit\n";
|
||||
|
||||
|
||||
print "current.label Current (A)\n";
|
||||
print "current.draw AREA\n";
|
||||
print "current.type GAUGE\n";
|
||||
|
@ -247,43 +247,43 @@ if (defined $ARGV[0] and $ARGV[0] eq "config") {
|
|||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category sensors\n";
|
||||
print "graph_info This graph shows the delivered apparent and real power to inlet $socketnumber of the Power Distribution Unit\n";
|
||||
|
||||
|
||||
print "apparentpower.label Apparent power (kVA)\n";
|
||||
print "apparentpower.draw LINE3\n";
|
||||
print "apparentpower.type GAUGE\n";
|
||||
|
||||
|
||||
print "realpower.label Real power (kW)\n";
|
||||
print "realpower.draw AREA\n";
|
||||
print "realpower.type COUNTER\n";
|
||||
|
||||
|
||||
exit 0;
|
||||
}
|
||||
elsif ($graphtype eq "outletcurrent") {
|
||||
print "graph_title Outlet $socketnumber current\n";
|
||||
|
||||
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category sensors\n";
|
||||
print "graph_info This graph shows the delivered current to outlet $socketnumber of the Power Distribution Unit\n";
|
||||
|
||||
|
||||
print "current.label Delivered current (A)\n";
|
||||
print "current.draw AREA\n";
|
||||
print "current.type GAUGE\n";
|
||||
}
|
||||
elsif ($graphtype eq "outletpower") {
|
||||
print "graph_title Outlet $socketnumber power\n";
|
||||
|
||||
|
||||
print "graph_args --base 1000 -l 0\n";
|
||||
print "graph_category sensors\n";
|
||||
print "graph_info This graph shows the delivered apparent and real power to outlet $socketnumber of the Power Distribution Unit\n";
|
||||
|
||||
|
||||
print "apparentpower.label Apparent power (kVA)\n";
|
||||
print "apparentpower.draw LINE3\n";
|
||||
print "apparentpower.type GAUGE\n";
|
||||
|
||||
|
||||
print "realpower.label Real power (kW)\n";
|
||||
print "realpower.draw AREA\n";
|
||||
print "realpower.type COUNTER\n";
|
||||
|
||||
|
||||
exit 0;
|
||||
}
|
||||
exit 0;
|
||||
|
@ -342,7 +342,7 @@ elsif ($graphtype eq "inletcurrent") {
|
|||
}
|
||||
elsif ($graphtype eq "inletpower") {
|
||||
my ($current, $energy, $voltage, $apparentpower);
|
||||
|
||||
|
||||
if (defined ($response = $session->get_request($oid_inletcurrent.$socketnumber))) {
|
||||
$current = $response->{$oid_inletcurrent.$socketnumber};
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ elsif ($graphtype eq "outletcurrent") {
|
|||
}
|
||||
elsif ($graphtype eq "outletpower") {
|
||||
my ($current, $energy, $voltage, $apparentpower);
|
||||
|
||||
|
||||
if (defined ($response = $session->get_request($oid_outletcurrent.$socketnumber))) {
|
||||
$current = $response->{$oid_outletcurrent.$socketnumber};
|
||||
}
|
||||
|
|
|
@ -31,9 +31,9 @@ Sentry3-MIB::infeedID.1.3 = STRING: AC
|
|||
Sentry3-MIB::infeedName.1.1 = STRING: Master_X
|
||||
Sentry3-MIB::infeedName.1.2 = STRING: Master_Y
|
||||
Sentry3-MIB::infeedName.1.3 = STRING: Master_Z
|
||||
Sentry3-MIB::infeedCapabilities.1.1 = BITS: C6 00 onSense(0) loadSense(1) voltageSense(5) powerSense(6)
|
||||
Sentry3-MIB::infeedCapabilities.1.2 = BITS: C6 00 onSense(0) loadSense(1) voltageSense(5) powerSense(6)
|
||||
Sentry3-MIB::infeedCapabilities.1.3 = BITS: C6 00 onSense(0) loadSense(1) voltageSense(5) powerSense(6)
|
||||
Sentry3-MIB::infeedCapabilities.1.1 = BITS: C6 00 onSense(0) loadSense(1) voltageSense(5) powerSense(6)
|
||||
Sentry3-MIB::infeedCapabilities.1.2 = BITS: C6 00 onSense(0) loadSense(1) voltageSense(5) powerSense(6)
|
||||
Sentry3-MIB::infeedCapabilities.1.3 = BITS: C6 00 onSense(0) loadSense(1) voltageSense(5) powerSense(6)
|
||||
Sentry3-MIB::infeedStatus.1.1 = INTEGER: on(1)
|
||||
Sentry3-MIB::infeedStatus.1.2 = INTEGER: on(1)
|
||||
Sentry3-MIB::infeedStatus.1.3 = INTEGER: on(1)
|
||||
|
@ -153,7 +153,7 @@ graph_info This shows the amperage drawn on your PDU. Per NEC, a PDU should not
|
|||
my $infeedName = $sentry_h->{$k}->{'infeedName'};
|
||||
my $critical = ($sentry_h->{$k}->{'infeedCapacity'})*.9; # 90% of capacity
|
||||
my $warning = $sentry_h->{$k}->{'infeedLoadHighThresh'}; # 80% of capacity
|
||||
|
||||
|
||||
print "$infeedName.critical $critical\n";
|
||||
print "$infeedName.draw LINE1\n";
|
||||
print "$infeedName.label $infeedName\n";
|
||||
|
@ -175,7 +175,7 @@ graph_info Power factor represents the efficiency of the components connected to
|
|||
|
||||
foreach my $k ( keys %{$sentry_h} ) {
|
||||
my $infeedName = $sentry_h->{$k}->{'infeedName'};
|
||||
|
||||
|
||||
print "$infeedName.draw LINE1\n";
|
||||
print "$infeedName.label $infeedName\n";
|
||||
print "$infeedName.type GAUGE\n";
|
||||
|
@ -194,7 +194,7 @@ graph_info Crest factor relates the peak value of a signal to its root mean squa
|
|||
|
||||
foreach my $k ( keys %{$sentry_h} ) {
|
||||
my $infeedName = $sentry_h->{$k}->{'infeedName'};
|
||||
|
||||
|
||||
print "$infeedName.draw LINE1\n";
|
||||
print "$infeedName.label $infeedName\n";
|
||||
print "$infeedName.type GAUGE\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue