diff options
Diffstat (limited to 'internal/metrics')
| -rw-r--r-- | internal/metrics/dashboard.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/metrics/dashboard.html b/internal/metrics/dashboard.html index e7af48c..363f1f7 100644 --- a/internal/metrics/dashboard.html +++ b/internal/metrics/dashboard.html | |||
| @@ -255,7 +255,8 @@ | |||
| 255 | const text = await response.text(); | 255 | const text = await response.text(); |
| 256 | const metrics = parsePrometheusMetrics(text); | 256 | const metrics = parsePrometheusMetrics(text); |
| 257 | 257 | ||
| 258 | const prefix = Object.keys(metrics)[0]?.split('_')[0] || 'muxstr'; | 258 | const relayMetric = Object.keys(metrics).find(k => k.includes('_relay_')); |
| 259 | const prefix = relayMetric ? relayMetric.split('_relay_')[0] : 'muxstr'; | ||
| 259 | 260 | ||
| 260 | document.getElementById('active_connections').textContent = | 261 | document.getElementById('active_connections').textContent = |
| 261 | sumMetric(metrics, `${prefix}_relay_active_connections`); | 262 | sumMetric(metrics, `${prefix}_relay_active_connections`); |
