From bc33c73963f17afa538bde4ab953c433ad03ef5b Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 15 Mar 2021 15:28:11 +0100 Subject: [PATCH] metrix: influx: fix default api_prefix we set the api prefix by default to '/' so we always triggered the the replacement and added '///' which is wrong and does not work for the 'health' api path (influxdb returns 404 for 'https://ip:port///health') Signed-off-by: Dominik Csapak --- PVE/Status/InfluxDB.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Status/InfluxDB.pm b/PVE/Status/InfluxDB.pm index 55c6efce..9e4b0d96 100644 --- a/PVE/Status/InfluxDB.pm +++ b/PVE/Status/InfluxDB.pm @@ -172,7 +172,7 @@ sub _get_v2url { my ($cfg, $api_path) = @_; my ($proto, $host, $port) = $cfg->@{qw(influxdbproto server port)}; my $api_prefix = $cfg->{'api-path-prefix'} // '/'; - if ($api_prefix ne '' && $api_prefix =~ m!^/*(.+)/*$!) { + if ($api_prefix ne '/' && $api_prefix =~ m!^/*(.+)/*$!) { $api_prefix = "/$1/"; }