From 8e41e054ae6258db309efb884304204ec85b8e6a Mon Sep 17 00:00:00 2001 From: Thibault S <48209914+thibaults-centreon@users.noreply.github.com> Date: Fri, 28 Apr 2023 10:46:30 +0200 Subject: [PATCH] apps::monitoring::kadiska::plugin - fix metric format (#4385) --- src/apps/monitoring/kadiska/mode/watcherstatistics.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/monitoring/kadiska/mode/watcherstatistics.pm b/src/apps/monitoring/kadiska/mode/watcherstatistics.pm index 962a3539e..860c7d52a 100644 --- a/src/apps/monitoring/kadiska/mode/watcherstatistics.pm +++ b/src/apps/monitoring/kadiska/mode/watcherstatistics.pm @@ -33,7 +33,7 @@ sub custom_usage_perfdata_ms { nlabel => $self->{nlabel}, unit => 'ms', instances => [ $self->{result_values}->{watcher_name}, $self->{result_values}->{site_name}, $self->{result_values}->{gateway_name} ], - value => sprintf('%s', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ), + value => sprintf('%.2f', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ), warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}), min => 0 @@ -46,7 +46,7 @@ sub custom_usage_perfdata { $self->{output}->perfdata_add( nlabel => $self->{nlabel}, instances => [ $self->{result_values}->{watcher_name}, $self->{result_values}->{site_name}, $self->{result_values}->{gateway_name} ], - value => sprintf('%s', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ), + value => sprintf('%.2f', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ), warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}), min => 0