mirror of
https://github.com/myronblair/jarvis
synced 2026-06-30 17:50:23 -05:00
Fix Proxmox API: use DDNS hostname (port 8006 forwarded via FortiGate)
This commit is contained in:
@@ -97,7 +97,7 @@ function collect_all(): array {
|
|||||||
// ── Proxmox ───────────────────────────────────────────────────────────
|
// ── Proxmox ───────────────────────────────────────────────────────────
|
||||||
try {
|
try {
|
||||||
if (defined('PROXMOX_TOKEN_ID') && PROXMOX_TOKEN_ID) {
|
if (defined('PROXMOX_TOKEN_ID') && PROXMOX_TOKEN_ID) {
|
||||||
$base = 'https://' . PROXMOX_HOST . ':' . PROXMOX_PORT . '/api2/json';
|
$base = 'https://orbisne.fortiddns.com:' . PROXMOX_PORT . '/api2/json';
|
||||||
$auth = 'Authorization: PVEAPIToken=' . PROXMOX_USER . '!' . PROXMOX_TOKEN_ID . '=' . PROXMOX_TOKEN_VAL;
|
$auth = 'Authorization: PVEAPIToken=' . PROXMOX_USER . '!' . PROXMOX_TOKEN_ID . '=' . PROXMOX_TOKEN_VAL;
|
||||||
|
|
||||||
$nd = pve_api_get("{$base}/nodes/" . PROXMOX_NODE . "/status", $auth);
|
$nd = pve_api_get("{$base}/nodes/" . PROXMOX_NODE . "/status", $auth);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function cacheStore(string $key, $data): void {
|
|||||||
|
|
||||||
// ── Proxmox ──────────────────────────────────────────────────────────────
|
// ── Proxmox ──────────────────────────────────────────────────────────────
|
||||||
if (PROXMOX_HOST !== '10.48.200.X' && PROXMOX_TOKEN_VAL !== 'YOUR_TOKEN_VALUE_HERE') {
|
if (PROXMOX_HOST !== '10.48.200.X' && PROXMOX_TOKEN_VAL !== 'YOUR_TOKEN_VALUE_HERE') {
|
||||||
$pveBase = 'https://' . PROXMOX_HOST . ':' . PROXMOX_PORT . '/api2/json';
|
$pveBase = 'https://orbisne.fortiddns.com:' . PROXMOX_PORT . '/api2/json';
|
||||||
$pveAuth = ['Authorization: PVEAPIToken=' . PROXMOX_USER . '!' . PROXMOX_TOKEN_ID . '=' . PROXMOX_TOKEN_VAL];
|
$pveAuth = ['Authorization: PVEAPIToken=' . PROXMOX_USER . '!' . PROXMOX_TOKEN_ID . '=' . PROXMOX_TOKEN_VAL];
|
||||||
|
|
||||||
$nodeStatusRaw = curlGet("$pveBase/nodes/" . PROXMOX_NODE . "/status", $pveAuth);
|
$nodeStatusRaw = curlGet("$pveBase/nodes/" . PROXMOX_NODE . "/status", $pveAuth);
|
||||||
|
|||||||
Reference in New Issue
Block a user