From 8dce544771ab4e2ac091b29e10ee6871fa88bdff Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Tue, 20 Sep 2016 15:33:16 +0200 Subject: [PATCH] + Fix session fortigate issue threshold Signed-off-by: garnier-quentin --- centreon/common/fortinet/fortigate/mode/sessions.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/centreon/common/fortinet/fortigate/mode/sessions.pm b/centreon/common/fortinet/fortigate/mode/sessions.pm index 65a2bc4e9..277df996e 100644 --- a/centreon/common/fortinet/fortigate/mode/sessions.pm +++ b/centreon/common/fortinet/fortigate/mode/sessions.pm @@ -56,7 +56,7 @@ sub check_options { } ($self->{warn1}, $self->{warn10}, $self->{warn30}, $self->{warn60}) = split /,/, $self->{option_results}->{warning_avg}; - ($self->{crit1}, $self->{crit10}, $self->{crit30}, $self->{warn60}) = split /,/, $self->{option_results}->{critical_avg}; + ($self->{crit1}, $self->{crit10}, $self->{crit30}, $self->{crit60}) = split /,/, $self->{option_results}->{critical_avg}; if (($self->{perfdata}->threshold_validate(label => 'warn1', value => $self->{warn1})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning (1min) threshold '" . $self->{warn1} . "'."); @@ -115,13 +115,13 @@ sub run { min => 0); my $exit1 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate1}, - threshold => [ { label => 'crit1', 'exit_litteral' => 'critical' }, { label => 'warn1', exit_litteral => 'warning' } ]); + threshold => [ { label => 'crit1', exit_litteral' => 'critical' }, { label => 'warn1', exit_litteral => 'warning' } ]); my $exit2 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate10}, - threshold => [ { label => 'crit10', 'exit_litteral' => 'critical' }, { label => 'warn10', exit_litteral => 'warning' } ]); + threshold => [ { label => 'crit10', exit_litteral => 'critical' }, { label => 'warn10', exit_litteral => 'warning' } ]); my $exit3 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate30}, - threshold => [ { label => 'crit30', 'exit_litteral' => 'critical' }, { label => 'warn30', exit_litteral => 'warning' } ]); + threshold => [ { label => 'crit30', exit_litteral => 'critical' }, { label => 'warn30', exit_litteral => 'warning' } ]); my $exit4 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate60}, - threshold => [ { label => 'crit60', 'exit_litteral' => 'critical' }, { label => 'warn60', exit_litteral => 'warning' } ]); + threshold => [ { label => 'crit60', exit_litteral => 'critical' }, { label => 'warn60', exit_litteral => 'warning' } ]); $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3, $exit4 ]); $self->{output}->output_add(severity => $exit, short_msg => sprintf("Averate session setup rate: %s, %s, %s, %s (1min, 10min, 30min, 60min)",