summaryrefslogtreecommitdiffstats
path: root/internal/metrics/dashboard.html
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-15 10:23:33 -0800
committerbndw <ben@bdw.to>2026-02-15 10:23:33 -0800
commita6ee0e3f268f9a847bf8a19159cf291021a0f38e (patch)
tree4425aba24282cfd8fbc074d4a801cffac5521885 /internal/metrics/dashboard.html
parente26729f658739b368073b558eb909af137609dfa (diff)
feat: add auth rejection metrics to dashboard
Updated metrics dashboard to show: - Unauthorized: Requests rejected due to pubkey not in allowlist - Pre-Auth: Requests sent before authentication completed - Challenges: Successful AUTH challenge completions This surfaces the new 'unauthorized' and 'unauthenticated' request status metrics on the dashboard for easier monitoring of auth issues.
Diffstat (limited to 'internal/metrics/dashboard.html')
-rw-r--r--internal/metrics/dashboard.html17
1 files changed, 12 insertions, 5 deletions
diff --git a/internal/metrics/dashboard.html b/internal/metrics/dashboard.html
index 1fa1ddf..ab08eab 100644
--- a/internal/metrics/dashboard.html
+++ b/internal/metrics/dashboard.html
@@ -168,12 +168,16 @@
168 <div class="card"> 168 <div class="card">
169 <h2>Authentication</h2> 169 <h2>Authentication</h2>
170 <div class="metric"> 170 <div class="metric">
171 <span class="metric-label">Success</span> 171 <span class="metric-label">Challenges</span>
172 <span class="metric-value" id="auth_success">0</span> 172 <span class="metric-value" id="auth_success">0</span>
173 </div> 173 </div>
174 <div class="metric"> 174 <div class="metric">
175 <span class="metric-label">Failed</span> 175 <span class="metric-label">Unauthorized</span>
176 <span class="metric-value" id="auth_failure">0</span> 176 <span class="metric-value" id="auth_unauthorized">0</span>
177 </div>
178 <div class="metric">
179 <span class="metric-label">Pre-Auth</span>
180 <span class="metric-value" id="auth_unauthenticated">0</span>
177 </div> 181 </div>
178 </div> 182 </div>
179 183
@@ -305,8 +309,11 @@
305 document.getElementById('auth_success').textContent = 309 document.getElementById('auth_success').textContent =
306 getMetricByLabel(metrics, `${prefix}_relay_auth_attempts_total`, 'result', 'success'); 310 getMetricByLabel(metrics, `${prefix}_relay_auth_attempts_total`, 'result', 'success');
307 311
308 document.getElementById('auth_failure').textContent = 312 document.getElementById('auth_unauthorized').textContent =
309 getMetricByLabel(metrics, `${prefix}_relay_auth_attempts_total`, 'result', 'failure'); 313 getMetricByLabel(metrics, `${prefix}_relay_requests_total`, 'status', 'unauthorized');
314
315 document.getElementById('auth_unauthenticated').textContent =
316 getMetricByLabel(metrics, `${prefix}_relay_requests_total`, 'status', 'unauthenticated');
310 317
311 document.getElementById('rate_limit_hits').textContent = 318 document.getElementById('rate_limit_hits').textContent =
312 sumMetric(metrics, `${prefix}_relay_rate_limit_hits_total`); 319 sumMetric(metrics, `${prefix}_relay_rate_limit_hits_total`);