Fix #6017
This commit is contained in:
parent
a8f59c89c8
commit
249f8b2cf6
|
@ -120,7 +120,7 @@ sub disco_show {
|
|||
# $options{snmp} = snmp object
|
||||
$self->{snmp} = $options{snmp};
|
||||
|
||||
$self->manage_selection();
|
||||
$self->manage_selection(disco => 1);
|
||||
foreach my $instance (sort @{$self->{node_id_selected}}) {
|
||||
my $name = $self->{result_names}->{$oid_ltmNodeAddrStatusName . '.' . $instance};
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ sub disco_show {
|
|||
# $options{snmp} = snmp object
|
||||
$self->{snmp} = $options{snmp};
|
||||
|
||||
$self->manage_selection();
|
||||
$self->manage_selection(disco => 1);
|
||||
foreach my $instance (sort @{$self->{pool_id_selected}}) {
|
||||
my $name = $self->{result_names}->{$oid_ltmPoolStatusName . '.' . $instance};
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ sub disco_show {
|
|||
# $options{snmp} = snmp object
|
||||
$self->{snmp} = $options{snmp};
|
||||
|
||||
$self->manage_selection();
|
||||
$self->manage_selection(disco => 1);
|
||||
foreach my $instance (sort @{$self->{vs_id_selected}}) {
|
||||
my $name = $self->{result_names}->{$oid_ltmVsStatusName . '.' . $instance};
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ sub manage_selection {
|
|||
}
|
||||
}
|
||||
|
||||
if (scalar(keys %{$self->{device_id_selected}}) <= 0) {
|
||||
if (scalar(keys %{$self->{device_id_selected}}) <= 0 && !defined($options{disco})) {
|
||||
if (defined($self->{option_results}->{device})) {
|
||||
$self->{output}->add_option_msg(short_msg => "No device found '" . $self->{option_results}->{device} . "' (or counter values are 0).");
|
||||
} else {
|
||||
|
@ -301,7 +301,7 @@ sub disco_show {
|
|||
# $options{snmp} = snmp object
|
||||
$self->{snmp} = $options{snmp};
|
||||
$self->{hostname} = $self->{snmp}->get_hostname();
|
||||
$self->manage_selection();
|
||||
$self->manage_selection(disco => 1);
|
||||
foreach (sort keys %{$self->{device_id_selected}}) {
|
||||
$self->{output}->add_disco_entry(name => $self->{results}->{$oid_diskIODevice}->{$oid_diskIODevice . '.' . $_},
|
||||
deviceid => $_);
|
||||
|
|
|
@ -166,7 +166,7 @@ sub manage_selection {
|
|||
}
|
||||
}
|
||||
|
||||
if (scalar(@{$self->{diskpath_id_selected}}) <= 0) {
|
||||
if (scalar(@{$self->{diskpath_id_selected}}) <= 0 && !defined($options{disco})) {
|
||||
if (defined($self->{option_results}->{diskpath})) {
|
||||
$self->{output}->add_option_msg(short_msg => "No disk path found for name '" . $self->{option_results}->{diskpath} . "'.");
|
||||
} else {
|
||||
|
@ -188,7 +188,7 @@ sub disco_show {
|
|||
# $options{snmp} = snmp object
|
||||
$self->{snmp} = $options{snmp};
|
||||
|
||||
$self->manage_selection();
|
||||
$self->manage_selection(disco => 1);
|
||||
my $result = $self->get_additional_information();
|
||||
foreach (sort @{$self->{diskpath_id_selected}}) {
|
||||
if (defined($result)) {
|
||||
|
|
|
@ -210,7 +210,7 @@ sub manage_selection {
|
|||
}
|
||||
}
|
||||
|
||||
if (scalar(@{$self->{interface_id_selected}}) <= 0) {
|
||||
if (scalar(@{$self->{interface_id_selected}}) <= 0 && !defined($options{disco})) {
|
||||
if (defined($self->{option_results}->{interface})) {
|
||||
$self->{output}->add_option_msg(short_msg => "No interface found for name '" . $self->{option_results}->{interface} . "'.");
|
||||
} else {
|
||||
|
@ -232,7 +232,7 @@ sub disco_show {
|
|||
# $options{snmp} = snmp object
|
||||
$self->{snmp} = $options{snmp};
|
||||
|
||||
$self->manage_selection();
|
||||
$self->manage_selection(disco => 1);
|
||||
my $result = $self->get_additional_information();
|
||||
foreach (sort @{$self->{interface_id_selected}}) {
|
||||
my $display_value = $self->get_display_value(id => $_);
|
||||
|
|
|
@ -224,7 +224,7 @@ sub manage_selection {
|
|||
}
|
||||
}
|
||||
|
||||
if (scalar(@{$self->{storage_id_selected}}) <= 0) {
|
||||
if (scalar(@{$self->{storage_id_selected}}) <= 0 && !defined($options{disco})) {
|
||||
if (defined($self->{option_results}->{storage})) {
|
||||
$self->{output}->add_option_msg(short_msg => "No storage found for name '" . $self->{option_results}->{storage} . "'.");
|
||||
} else {
|
||||
|
@ -246,7 +246,7 @@ sub disco_show {
|
|||
# $options{snmp} = snmp object
|
||||
$self->{snmp} = $options{snmp};
|
||||
|
||||
$self->manage_selection();
|
||||
$self->manage_selection(disco => 1);
|
||||
my $result = $self->get_additional_information();
|
||||
foreach (sort @{$self->{storage_id_selected}}) {
|
||||
my $display_value = $self->get_display_value(id => $_);
|
||||
|
|
Loading…
Reference in New Issue