fixed the fetching code to retrieve the uptime value in 'redis.pm' #140

This commit is contained in:
Jordi Sanfeliu 2020-12-30 16:42:51 +01:00
parent 5fe541fa04
commit 98eda3e8e5
1 changed files with 4 additions and 2 deletions

View File

@ -479,9 +479,11 @@ sub redis_cgi {
}
my (undef, undef, undef, $data) = RRDs::fetch("$rrd",
"--resolution=60",
"--start=-1min",
"AVERAGE",
"-r 60");
"AVERAGE");
$err = RRDs::error;
push(@output, "ERROR: while fetching $rrd: $err\n") if $err;
my $line = @$data[0];
my ($uptime) = @$line[$e * 28];
my $uptimeline;