1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Fix geowebcache-cache-hits-ratio

This commit is contained in:
Romain MAZIERE 2020-04-22 18:13:37 +02:00 committed by Lars Kruse
parent f6738f415e
commit 5a37346602

View file

@ -1,10 +1,10 @@
#!/usr/bin/perl
# -*- perl -*-
# Author Rodolphe Quiédeville <rodolphe@quiedeville.org>
# Author Rodolphe Quiédeville <rodolphe@quiedeville.org>
# Licence : GPLv2
# Code based on tomcat_volume plugin by
# Rune Nordbøe Skillingstad <runesk@linpro.no>
# Rune Nordbøe Skillingstad <runesk@linpro.no>
=head1 NAME
@ -41,7 +41,7 @@ HTTP port numbers
=head1 AUTHOR
Rodolphe Quiédeville <rodolphe@quiedeville.org>
Rodolphe Quiédeville <rodolphe@quiedeville.org>
=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 =~ '<tr><td colspan="5"> </td></tr><tr><td colspan="2">Cache hit ratio:</td><td colspan="3">(\d\d?\.?\d+)% of requests</td></tr>' ) {
print "ratio.value " . $1;
if ($response->content =~ '<tr><th colspan="2" scope="row">Cache hit ratio:</th><td colspan="3">(\d+\.\d+)% of requests</td></tr>' ) {
print "ratio.value " . $1 . "\n";
} else {
print "ratio.value U\n";
}