onepassword-operator icon indicating copy to clipboard operation
onepassword-operator copied to clipboard

total error prometheus metric

Open YR-ZR0 opened this issue 2 years ago • 1 comments

Summary

I would like a Prometheus metric that exposes total healthy and unhealthy metrics for onepassword items.

Use cases

The use case i see for this is mostly around monitoring and alerting. it is general practice in Kubernetes to monitor your cluster using Prometheus and to alert on specific metrics. i see this feature request as a way to pick up when secrets have not correctly been applied and alerting that to an SRE team or a DevOps team.

Proposed solution

A proposed solution would be to extend the Prometheus metrics to include a healthy and unhealthy metric point. please refer to the prior work as sealed secrets by bitnami has a similar metric which i believe pulls the status fields of the secret CRD to infer if a secret has been decrypted or not.

References & Prior Work

This is how sealed secrets exposes the error metric: https://github.com/bitnami-labs/sealed-secrets/blob/main/pkg/controller/metrics.go

YR-ZR0 avatar Sep 05 '23 09:09 YR-ZR0