From 5494858598d33020bfa1ed56ef4a84b960b26845 Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Fri, 19 May 2017 11:21:39 +0200 Subject: [PATCH] + add capabilities to display number of alerts --- centreon/plugins/templates/counter.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/centreon/plugins/templates/counter.pm b/centreon/plugins/templates/counter.pm index e146610e6..fb6454bd5 100644 --- a/centreon/plugins/templates/counter.pm +++ b/centreon/plugins/templates/counter.pm @@ -330,6 +330,12 @@ sub run_group { short_msg => "$total_problems problem(s) detected"); } } + + if (defined($options{config}->{display_counter_problem})) { + $self->{output}->perfdata_add(label => $options{config}->{display_counter_problem}->{label}, unit => $options{config}->{display_counter_problem}->{unit}, + value => $total_problems, + min => $options{config}->{display_counter_problem}->{min}, max => $options{config}->{display_counter_problem}->{max}); + } } sub run {