From b09e785a53d01dfb3da7d19c12981752de8d6d99 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Thu, 26 Mar 2026 16:55:27 +0000 Subject: [PATCH] Use auth on metrics API --- trustgraph-cli/trustgraph/cli/verify_system_status.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trustgraph-cli/trustgraph/cli/verify_system_status.py b/trustgraph-cli/trustgraph/cli/verify_system_status.py index 8cebc83f..5fea1bb0 100644 --- a/trustgraph-cli/trustgraph/cli/verify_system_status.py +++ b/trustgraph-cli/trustgraph/cli/verify_system_status.py @@ -178,7 +178,11 @@ def check_processors(url: str, min_processors: int, timeout: int, token: Optiona url += '/' metrics_url = f"{url}api/metrics/query?query=processor_info" - resp = requests.get(metrics_url, timeout=timeout) + headers = {} + if token: + headers["Authorization"] = f"Bearer {token}" + + resp = requests.get(metrics_url, timeout=timeout, headers=headers) if resp.status_code == 200: data = resp.json() processor_count = len(data.get("data", {}).get("result", []))