mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-29 02:12:47 +00:00
metrics: influx: special case 'health' api path i _get_v2url
the forwards compatible api of 1.8 only contains this path (not api/v2/health) and it it also contained in the v2 api Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
c69faba311
commit
c7777408ea
@ -175,7 +175,12 @@ sub _get_v2url {
|
|||||||
if ($api_prefix ne '' && $api_prefix =~ m!^/*(.+)/*$!) {
|
if ($api_prefix ne '' && $api_prefix =~ m!^/*(.+)/*$!) {
|
||||||
$api_prefix = "/$1/";
|
$api_prefix = "/$1/";
|
||||||
}
|
}
|
||||||
return "${proto}://${host}:${port}${api_prefix}api/v2/${api_path}";
|
|
||||||
|
if ($api_path ne 'health') {
|
||||||
|
$api_path = "api/v2/${api_path}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "${proto}://${host}:${port}${api_prefix}${api_path}";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _connect {
|
sub _connect {
|
||||||
|
Loading…
Reference in New Issue
Block a user