Skip to content

docs: update metrics documentation#1853

Open
Ansita20 wants to merge 1 commit intokyverno:mainfrom
Ansita20:docs-metrics-update
Open

docs: update metrics documentation#1853
Ansita20 wants to merge 1 commit intokyverno:mainfrom
Ansita20:docs-metrics-update

Conversation

@Ansita20
Copy link

Related Issue

Fixes #1792


Proposed Changes

This PR updates the Kyverno metrics documentation to clearly include and demonstrate the usage of kyverno_policy_results_total alongside kyverno_policy_results.

Key Updates

  • Updated the metrics list to include kyverno_policy_results_total with consistent naming and references.
  • Improved the Helm chart annotation example to correctly show both kyverno_policy_results and kyverno_policy_results_total.
  • Enhanced Prometheus query examples to demonstrate the usage of both metrics in real-world monitoring scenarios.
  • Updated the metrics reference section to reflect accurate metric names and queries.

Motivation

The existing documentation primarily focused on kyverno_policy_results, which could lead to confusion when users encounter kyverno_policy_results_total in monitoring setups.
By explicitly documenting both metrics and aligning examples, this change improves clarity, correctness, and usability of the Kyverno metrics documentation.

Visual Reference

kyverno ---

Checklist

  • I have read the contributing guidelines.
  • I have inspected the website preview for accuracy.
  • I have signed off my issue.

Copilot AI review requested due to automatic review settings January 31, 2026 07:44
Signed-off-by: ansita20 <ansitasingh20@gmail.com>
@Ansita20 Ansita20 force-pushed the docs-metrics-update branch from e9bc9da to 47eca35 Compare January 31, 2026 07:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_results to kyverno_policy_results_total throughout 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"}
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"}
            ]
          }
        ]
      }
    }
Suggested change
{"kyverno_policy_results_total": "policy_results"}
{"kyverno_policy_results_total": "policy_results"}
]
}
]
}
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Policy and Rule Execution

1 participant