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 # v0.0.2
# #
# # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
use Net::SNMP; use Net::SNMP;
use Getopt::Std; use Getopt::Std;
@ -235,7 +235,9 @@ if ($list) {
Specify a sensor by using the -s and the INTERNAL name of the sensor Specify a sensor by using the -s and the INTERNAL name of the sensor
Detected sensors: Detected sensors:
EO EO
printf("\t%-32s %s\n", "Friendly Name", "Internal Name"); printf("\t%-32s %s\n", "Friendly Name", "Internal Name");
foreach my $id (sort { $sensor{$a}->{"friendly_name"} cmp $sensor{$b}->{"friendly_name"} } keys %sensor) { 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}\""); 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( my $snmpd = getmasked_values(
$oidbase, { $oidbase, {
$oids{$param}->{sensor_key} => 'sensor_key', $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) { if ((keys %{$snmpd}) > 1 && !$sensor_int_name) {