Fix #477
This commit is contained in:
parent
fef367e129
commit
cc4b92badf
|
@ -108,6 +108,24 @@ sub set_counters {
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ label => 'total-enabled', set => {
|
||||||
|
key_values => [ { name => 'enable' } ],
|
||||||
|
output_template => 'Total ap enabled : %s',
|
||||||
|
perfdatas => [
|
||||||
|
{ label => 'total_enabled', value => 'enable_absolute', template => '%s',
|
||||||
|
min => 0 },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ label => 'total-disabled', set => {
|
||||||
|
key_values => [ { name => 'disable' } ],
|
||||||
|
output_template => 'Total ap disabled : %s',
|
||||||
|
perfdatas => [
|
||||||
|
{ label => 'total_disabled', value => 'disable_absolute', template => '%s',
|
||||||
|
min => 0 },
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
$self->{maps_counters}->{ap} = [
|
$self->{maps_counters}->{ap} = [
|
||||||
|
@ -192,7 +210,7 @@ sub manage_selection {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
$self->{ap} = {};
|
$self->{ap} = {};
|
||||||
$self->{global} = { total => 0, associated => 0, disassociating => 0, downloading => 0 };
|
$self->{global} = { total => 0, associated => 0, disassociating => 0, downloading => 0, enable => 0, disable => 0 };
|
||||||
$self->{results} = $options{snmp}->get_multiple_table(oids => [ { oid => $oid_agentInventoryMachineModel },
|
$self->{results} = $options{snmp}->get_multiple_table(oids => [ { oid => $oid_agentInventoryMachineModel },
|
||||||
{ oid => $mapping->{bsnAPName}->{oid} },
|
{ oid => $mapping->{bsnAPName}->{oid} },
|
||||||
{ oid => $mapping2->{bsnAPOperationStatus}->{oid} },
|
{ oid => $mapping2->{bsnAPOperationStatus}->{oid} },
|
||||||
|
@ -215,6 +233,7 @@ sub manage_selection {
|
||||||
|
|
||||||
$self->{global}->{total}++;
|
$self->{global}->{total}++;
|
||||||
$self->{global}->{$result2->{bsnAPOperationStatus}}++;
|
$self->{global}->{$result2->{bsnAPOperationStatus}}++;
|
||||||
|
$self->{global}->{$result3->{bsnAPAdminStatus}}++;
|
||||||
|
|
||||||
$self->{ap}->{$instance} = { display => $result->{bsnAPName},
|
$self->{ap}->{$instance} = { display => $result->{bsnAPName},
|
||||||
opstatus => $result2->{bsnAPOperationStatus}, admstatus => $result3->{bsnAPAdminStatus}};
|
opstatus => $result2->{bsnAPOperationStatus}, admstatus => $result3->{bsnAPAdminStatus}};
|
||||||
|
@ -257,12 +276,12 @@ Can used special variables like: %{admstatus}, %{opstatus}, %{display}
|
||||||
=item B<--warning-*>
|
=item B<--warning-*>
|
||||||
|
|
||||||
Threshold warning.
|
Threshold warning.
|
||||||
Can be: 'total', 'total-associated', 'total-disassociating'.
|
Can be: 'total', 'total-associated', 'total-disassociating', 'total-enabled', 'total-disabled'.
|
||||||
|
|
||||||
=item B<--critical-*>
|
=item B<--critical-*>
|
||||||
|
|
||||||
Threshold critical.
|
Threshold critical.
|
||||||
Can be: 'total', 'total-associated', 'total-disassociating'.
|
Can be: 'total', 'total-associated', 'total-disassociating', 'total-enabled', 'total-disabled'.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue