Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added failed controller reconcilations metrics. #111

Closed
wants to merge 4 commits into from
Closed

Conversation

Strigix
Copy link
Contributor

@Strigix Strigix commented May 29, 2024

Hey guys,

can you please take a look whether this will work?

I've added metrics for failed reconciliations per controller.
Please check whether I've put the increases of the metrics on the right place if you've got time.
Other suggestions for possibly interesting metrics are more than welcome as well.

thank you

@Strigix Strigix requested a review from a team as a code owner May 29, 2024 09:03
Comment on lines 8 to 24
var (
// FailedClusterPolicyControllerReconciliations is a Prometheus counter to keep track of the number of failed Cluster Policy Controller reconciliations.
FailedClusterPolicyControllerReconciliations = promauto.NewCounter(prometheus.CounterOpts{
Name: "cluster_policy_controller_failed_reconciliations_total",
Help: "The total number of failed cluster policy controller reconciliations",
})
// FailedPolicyExceptionControllerReconciliations is a Prometheus counter to keep track of the number of failed Policy Exception Controller reconciliations.
FailedPolicyExceptionControllerReconciliations = promauto.NewCounter(prometheus.CounterOpts{
Name: "policy_exception_controller_failed_reconciliations_total",
Help: "The total number of failed policy exception controller reconciliations",
})
// FailedPolicyManifestControllerReconciliations is a Prometheus counter to keep track of the number of failed Policy Manifest Controller reconciliations.
FailedPolicyManifestControllerReconciliations = promauto.NewCounter(prometheus.CounterOpts{
Name: "policy_manifest_controller_failed_reconciliations_total",
Help: "The total number of failed policy manifest controller reconciliations",
})
)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest having one metric and including the controller context as a label (related comment).

@Strigix Strigix closed this May 29, 2024
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.

2 participants