From 5a37346602f5890349e59564d281b1c819282929 Mon Sep 17 00:00:00 2001 From: Romain MAZIERE Date: Wed, 22 Apr 2020 18:13:37 +0200 Subject: [PATCH] Fix geowebcache-cache-hits-ratio --- plugins/geowebcache/geowebcache-cache-hits-ratio | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/geowebcache/geowebcache-cache-hits-ratio b/plugins/geowebcache/geowebcache-cache-hits-ratio index a14f4d5c..941b62e3 100755 --- a/plugins/geowebcache/geowebcache-cache-hits-ratio +++ b/plugins/geowebcache/geowebcache-cache-hits-ratio @@ -1,10 +1,10 @@ #!/usr/bin/perl # -*- perl -*- -# Author Rodolphe Quiédeville +# Author Rodolphe Quiédeville # Licence : GPLv2 # Code based on tomcat_volume plugin by -# Rune Nordbøe Skillingstad +# Rune Nordbøe Skillingstad =head1 NAME @@ -41,7 +41,7 @@ HTTP port numbers =head1 AUTHOR -Rodolphe Quiédeville +Rodolphe Quiédeville =head1 USAGE @@ -111,8 +111,8 @@ if(exists $ARGV[0] and $ARGV[0] eq "config") { my $ua = LWP::UserAgent->new(timeout => $TIMEOUT); my $response = $ua->request(HTTP::Request->new('GET',$url)); -if ($response->content =~ ' Cache hit ratio:(\d\d?\.?\d+)% of requests' ) { - print "ratio.value " . $1; +if ($response->content =~ 'Cache hit ratio:(\d+\.\d+)% of requests' ) { + print "ratio.value " . $1 . "\n"; } else { print "ratio.value U\n"; }