From e4712b5ceb059aa0e856af8a66252627222940ac Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Mon, 13 Jan 2014 10:08:51 +0100 Subject: [PATCH] + Test and minor fix on juniper mag --- network/juniper/common/ive/mode/users.pm | 10 +++++----- network/juniper/mag/mode/bladetemperature.pm | 4 ++-- network/juniper/mag/plugin.pm | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/network/juniper/common/ive/mode/users.pm b/network/juniper/common/ive/mode/users.pm index 9b13c2d60..ca9036008 100644 --- a/network/juniper/common/ive/mode/users.pm +++ b/network/juniper/common/ive/mode/users.pm @@ -121,16 +121,16 @@ sub run { threshold => [ { label => 'critical_cluster', 'exit_litteral' => 'critical' }, { label => 'warning_cluster', exit_litteral => 'warning' } ]); $self->{output}->output_add(severity => $exit1, - short_msg => sprintf("Current concurrent signed-in web users connections: %d, ", + short_msg => sprintf("Current concurrent signed-in web users connections: %d", $result->{$oid_signedInWebUsers})); $self->{output}->output_add(severity => $exit2, - short_msg => sprintf("Current concurrent meeting users connections: %d, ", - $result->{$oid_meetingUserCount})); + short_msg => sprintf("Current concurrent meeting users connections: %s", + defined($result->{$oid_meetingUserCount}) ? $result->{$oid_meetingUserCount} : 'unknown')); $self->{output}->output_add(severity => $exit3, - short_msg => sprintf("Current concurrent node logged users connections: %d, ", + short_msg => sprintf("Current concurrent node logged users connections: %d", $result->{$oid_iveConcurrentUsers})); $self->{output}->output_add(severity => $exit4, - short_msg => sprintf("Current concurrent cluster logged users connections: %d, ", + short_msg => sprintf("Current concurrent cluster logged users connections: %d", $result->{$oid_clusterConcurrentUsers})); $self->{output}->perfdata_add(label => "web", diff --git a/network/juniper/mag/mode/bladetemperature.pm b/network/juniper/mag/mode/bladetemperature.pm index 43db83050..6899aef2e 100644 --- a/network/juniper/mag/mode/bladetemperature.pm +++ b/network/juniper/mag/mode/bladetemperature.pm @@ -33,7 +33,7 @@ # #################################################################################### -package network::juniper::mag::plugin::mode::bladetemperature; +package network::juniper::mag::mode::bladetemperature; use base qw(centreon::plugins::mode); @@ -80,7 +80,7 @@ sub run { my $exit_code = $self->{perfdata}->threshold_check(value => $result->{$oid_iveTemperature}, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); $self->{output}->output_add(severity => $exit_code, - short_msg => sprintf("Blade Temperautre is %.2f%% C", + short_msg => sprintf("Blade Temperautre is %.2f C", $result->{$oid_iveTemperature})); $self->{output}->perfdata_add(label => 'temperature', unit => 'C', value => sprintf("%.2f", $result->{$oid_iveTemperature}), diff --git a/network/juniper/mag/plugin.pm b/network/juniper/mag/plugin.pm index 7cfc36942..993a00ecc 100644 --- a/network/juniper/mag/plugin.pm +++ b/network/juniper/mag/plugin.pm @@ -53,7 +53,7 @@ sub new { 'users' => 'network::juniper::common::ive::mode::users', 'memory' => 'snmp_standard::mode::memory', 'swap' => 'snmp_standard::mode::swap', - 'blade-temperature' => 'network::juniper::mag::plugin::mode::bladetemperature', + 'blade-temperature' => 'network::juniper::mag::mode::bladetemperature', ); return $self;