Fix Prometheus Metrics and Grafana dashboard - #54
Merged
Conversation
- externalcas/metrics.go: Changed externalCAStatus from a plain Gauge to a GaugeVec with a ca_url label, so the upstream CA URL is carried directly in the time series. - externalcas/metrics_test.go: Added two tests covering the new GaugeVec behaviour — UP on 2xx and DOWN on non-2xx, both asserting the ca_url label is set correctly. - contrib/develop/grafana-dashboard.json: Reworked the Health Overview section — External CA panel replaced with a table showing URL + coloured UP/DOWN status; Issuance Success Rate switched to a fixed 24h window; Issued/Revoked totals now read from the persistent KV-backed collector metrics instead of process-reset-sensitive counters; operation rate panels converted from ops/sec to ops/day. Added Issuer column to the All Certificates and Renewal Count inventory tables. Added a new "Certificates Issued in Time Range" panel that filters to certs issued within the dashboard time picker window, showing SAN, Issuer, Serial, and Days Remaining with a row count footer. Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
=======================================
Coverage 44.28% 44.28%
=======================================
Files 6 6
Lines 490 490
=======================================
Hits 217 217
Misses 262 262
Partials 11 11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
problems Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
Signed-off-by: Kapil Agrawal <7047165+netops2devops@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Metrics endpoint
Grafana Dashboard