From ab23799bded98553a2082f700edaaeef87c4cf27 Mon Sep 17 00:00:00 2001 From: qgarnier Date: Wed, 29 Sep 2021 15:10:26 +0200 Subject: [PATCH] fix(protocol/http): json-content mode - manage version x.y.z as string (#3156) --- apps/protocols/http/mode/jsoncontent.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/protocols/http/mode/jsoncontent.pm b/apps/protocols/http/mode/jsoncontent.pm index 5bc8d8654..23be68a80 100644 --- a/apps/protocols/http/mode/jsoncontent.pm +++ b/apps/protocols/http/mode/jsoncontent.pm @@ -232,7 +232,7 @@ sub lookup { my $count = 0; foreach my $value (@{$self->{values}}) { $count++; - if ($value =~ /^(?:[0-9.]+|([0-9.]*)e([-+]?)(\d*))$/) { + if ($value =~ /^(?:[0-9]+(?:\.[0-9]+)?|([0-9.]*)e([-+]?)(\d*))$/) { my $value_expand = centreon::plugins::misc::expand_exponential(value => $value); if ($self->{option_results}->{threshold_value} eq 'values') { my $exit = lc(