This commit is contained in:
qgarnier 2017-06-26 13:45:26 +02:00
parent fef367e129
commit cc4b92badf
1 changed files with 22 additions and 3 deletions

View File

@ -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} = [
@ -192,7 +210,7 @@ sub manage_selection {
my ($self, %options) = @_;
$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 },
{ oid => $mapping->{bsnAPName}->{oid} },
{ oid => $mapping2->{bsnAPOperationStatus}->{oid} },
@ -215,6 +233,7 @@ sub manage_selection {
$self->{global}->{total}++;
$self->{global}->{$result2->{bsnAPOperationStatus}}++;
$self->{global}->{$result3->{bsnAPAdminStatus}}++;
$self->{ap}->{$instance} = { display => $result->{bsnAPName},
opstatus => $result2->{bsnAPOperationStatus}, admstatus => $result3->{bsnAPAdminStatus}};
@ -257,12 +276,12 @@ Can used special variables like: %{admstatus}, %{opstatus}, %{display}
=item B<--warning-*>
Threshold warning.
Can be: 'total', 'total-associated', 'total-disassociating'.
Can be: 'total', 'total-associated', 'total-disassociating', 'total-enabled', 'total-disabled'.
=item B<--critical-*>
Threshold critical.
Can be: 'total', 'total-associated', 'total-disassociating'.
Can be: 'total', 'total-associated', 'total-disassociating', 'total-enabled', 'total-disabled'.
=back