Conversation
Signed-off-by: ansita20 <ansitasingh20@gmail.com>
e9bc9da to
47eca35
Compare
There was a problem hiding this comment.
Pull request overview
This PR updates the Kyverno metrics documentation to correct the metric name from kyverno_policy_results to kyverno_policy_results_total, addressing issue #1792 where users discovered a mismatch between the documented metric name and the actual metric name in Prometheus.
Changes:
- Updated metric name references from
kyverno_policy_resultstokyverno_policy_results_totalthroughout the documentation - Updated Prometheus query examples to use the correct metric name
- Updated DataDog OpenMetrics configuration examples in monitoring guide
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/content/docs/docs/reference/metrics.md | Updated metric name from kyverno_policy_results to kyverno_policy_results_total and corrected all Prometheus query examples to use the updated metric name |
| src/content/docs/docs/guides/monitoring.md | Updated metric name references in list items and DataDog OpenMetrics configuration examples to use kyverno_policy_results_total |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ] | ||
| } | ||
| } | ||
| {"kyverno_policy_results_total": "policy_results"} |
There was a problem hiding this comment.
The YAML example appears to be incomplete. The metrics array starting at line 210 is missing its closing brackets and the containing JSON objects are missing their closing braces. This should include the closing for the metrics array (]), the instance object (}), the instances array (]), and the openmetrics object (}).
Based on the second example later in the file (lines 223-251), the complete structure should look like:
"metrics": [
{"kyverno_policy_results_total": "policy_results"}
]
}
]
}
}| {"kyverno_policy_results_total": "policy_results"} | |
| {"kyverno_policy_results_total": "policy_results"} | |
| ] | |
| } | |
| ] | |
| } | |
| } |
Related Issue
Fixes #1792
Proposed Changes
This PR updates the Kyverno metrics documentation to clearly include and demonstrate the usage of
kyverno_policy_results_totalalongsidekyverno_policy_results.Key Updates
kyverno_policy_results_totalwith consistent naming and references.kyverno_policy_resultsandkyverno_policy_results_total.Motivation
The existing documentation primarily focused on
kyverno_policy_results, which could lead to confusion when users encounterkyverno_policy_results_totalin monitoring setups.By explicitly documenting both metrics and aligning examples, this change improves clarity, correctness, and usability of the Kyverno metrics documentation.
Visual Reference
Checklist