From 7d184bdd1569e4eeccd1721d13a4b94cad1658f7 Mon Sep 17 00:00:00 2001 From: Quentin Garnier Date: Thu, 19 Mar 2015 17:16:51 +1100 Subject: [PATCH] Fix perf cast int in values.pm --- centreon-plugins/centreon/plugins/values.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centreon-plugins/centreon/plugins/values.pm b/centreon-plugins/centreon/plugins/values.pm index 696513d66..825434545 100644 --- a/centreon-plugins/centreon/plugins/values.pm +++ b/centreon-plugins/centreon/plugins/values.pm @@ -183,10 +183,10 @@ sub perfdata { my $warn = defined($self->{threshold_warn}) ? $self->{threshold_warn} : 'warning-' . $self->{label}; my $crit = defined($self->{threshold_crit}) ? $self->{threshold_crit} : 'critical-' . $self->{label}; - my $cast_int = defined($options{cast_int}) ? $options{cast_int} : 0; foreach my $perf (@{$self->{perfdatas}}) { my ($label, $extra_label, $min, $max, $th_total) = ($self->{label}, ''); + my $cast_int = (defined($perf->{cast_int}) && $perf->{cast_int} == 1) ? 1 : 0; my $template = '%s'; $template = $perf->{template} if (defined($perf->{template}));