From 7b3d7d3efa5a59ba698fc2313d3e98e69e38980e Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Wed, 3 Jun 2020 09:31:39 +0200 Subject: [PATCH] add black alarm ip-label --- .../iplabel/datametrie/restapi/mode/alarms.pm | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/monitoring/iplabel/datametrie/restapi/mode/alarms.pm b/apps/monitoring/iplabel/datametrie/restapi/mode/alarms.pm index 35ba7a2bd..1ddbe3902 100644 --- a/apps/monitoring/iplabel/datametrie/restapi/mode/alarms.pm +++ b/apps/monitoring/iplabel/datametrie/restapi/mode/alarms.pm @@ -39,9 +39,9 @@ sub set_counters { ]; $self->{maps_counters}->{global} = [ - { label => 'orange', nlabel => 'alarms.orange.count', set => { - key_values => [ { name => 'orange' } ], - output_template => 'orange: %s', + { label => 'black', nlabel => 'alarms.black.count', set => { + key_values => [ { name => 'black' } ], + output_template => 'black: %s', perfdatas => [ { template => '%s', min => 0 } ] @@ -54,6 +54,14 @@ sub set_counters { { 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' ); - $self->{global} = { orange => 0, red => 0 }; + $self->{global} = { orange => 0, red => 0, black => 0 }; return if (ref($results) ne 'ARRAY'); foreach (@$results) { @@ -105,12 +113,12 @@ Check current alarms. =item B<--filter-counters> Only display some counters (regexp can be used). -Example: --filter-counters='orange' +Example: --filter-counters='black' =item B<--warning-*> B<--critical-*> Thresholds. -Can be: 'orange', 'red'. +Can be: 'black', 'red', 'orange'. =back