1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-09-28 16:33:46 +02:00

Update check_apcext.pl

Fix code indentation
This commit is contained in:
Sidney Souza 2014-12-02 10:58:38 -02:00
parent 13cab5608e
commit 231f2c74c4

View File

@ -6,7 +6,7 @@
#
# v0.0.2
#
#
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
use Net::SNMP;
use Getopt::Std;
@ -202,7 +202,7 @@ my %oids = (
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.25.0',
'cdef' => '$val * .10'
},
);
);
if ($list) {
my ($baseoid, $int_name_id, $value_id) = @_;
@ -235,7 +235,9 @@ if ($list) {
Specify a sensor by using the -s and the INTERNAL name of the sensor
Detected sensors:
EO
printf("\t%-32s %s\n", "Friendly Name", "Internal Name");
foreach my $id (sort { $sensor{$a}->{"friendly_name"} cmp $sensor{$b}->{"friendly_name"} } keys %sensor) {
printf ("\t%-32s %s\n", "\"$sensor{$id}->{friendly_name}\"", "\"$sensor{$id}->{int_name}\"");
}
@ -323,7 +325,8 @@ if ($param eq "rpduamps") {
my $snmpd = getmasked_values(
$oidbase, {
$oids{$param}->{sensor_key} => 'sensor_key',
$oids{$param}->{sensor_val} => 'sensor_val' }
$oids{$param}->{sensor_val} => 'sensor_val'
}
);
if ((keys %{$snmpd}) > 1 && !$sensor_int_name) {