add black alarm ip-label

This commit is contained in:
garnier-quentin 2020-06-03 09:31:39 +02:00
parent e588cd63da
commit 7b3d7d3efa
1 changed files with 14 additions and 6 deletions

View File

@ -39,9 +39,9 @@ sub set_counters {
]; ];
$self->{maps_counters}->{global} = [ $self->{maps_counters}->{global} = [
{ label => 'orange', nlabel => 'alarms.orange.count', set => { { label => 'black', nlabel => 'alarms.black.count', set => {
key_values => [ { name => 'orange' } ], key_values => [ { name => 'black' } ],
output_template => 'orange: %s', output_template => 'black: %s',
perfdatas => [ perfdatas => [
{ template => '%s', min => 0 } { template => '%s', min => 0 }
] ]
@ -54,6 +54,14 @@ sub set_counters {
{ template => '%s', min => 0 } { template => '%s', min => 0 }
] ]
} }
},
{ label => 'orange', nlabel => 'alarms.orange.count', set => {
key_values => [ { name => 'orange' } ],
output_template => 'orange: %s',
perfdatas => [
{ template => '%s', min => 0 }
]
}
} }
]; ];
} }
@ -84,7 +92,7 @@ sub manage_selection {
label => 'Get_Current_Alarms_All_Monitors' label => 'Get_Current_Alarms_All_Monitors'
); );
$self->{global} = { orange => 0, red => 0 }; $self->{global} = { orange => 0, red => 0, black => 0 };
return if (ref($results) ne 'ARRAY'); return if (ref($results) ne 'ARRAY');
foreach (@$results) { foreach (@$results) {
@ -105,12 +113,12 @@ Check current alarms.
=item B<--filter-counters> =item B<--filter-counters>
Only display some counters (regexp can be used). Only display some counters (regexp can be used).
Example: --filter-counters='orange' Example: --filter-counters='black'
=item B<--warning-*> B<--critical-*> =item B<--warning-*> B<--critical-*>
Thresholds. Thresholds.
Can be: 'orange', 'red'. Can be: 'black', 'red', 'orange'.
=back =back