mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-24 11:23:47 +01:00
Update check_apcext.pl
Fix code indentation
This commit is contained in:
parent
13cab5608e
commit
231f2c74c4
@ -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;
|
||||||
@ -202,7 +202,7 @@ my %oids = (
|
|||||||
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.25.0',
|
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.25.0',
|
||||||
'cdef' => '$val * .10'
|
'cdef' => '$val * .10'
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($list) {
|
if ($list) {
|
||||||
my ($baseoid, $int_name_id, $value_id) = @_;
|
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
|
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user