nifikop icon indicating copy to clipboard operation
nifikop copied to clipboard

Operator Metrics

Open r65535 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem?

We should add a prometheus metrics endpoint, so the nifikop operator can be monitored

Describe the solution you'd like to see

Some custom metrics, similar to the prometheus operator

Things like total reconcile operations, error count etc

This could help spot operator bugs

Describe alternatives you've considered

No response

Additional context

No response

r65535 avatar Aug 24 '22 12:08 r65535

I discovered through working on this that most of the metrics in the linked Prometheus example are already provided by the controller runtime. There may still be additional metrics we'd like to capture but we can specify those in this issue before raising another PR.

https://book.kubebuilder.io/reference/metrics-reference.html

mh013370 avatar Aug 25 '22 15:08 mh013370

Off the top of my head, we could capture metrics around the following:

  • Number, response code, and duration of requests-by-API-endpoint to NiFi nodes/clusters
  • Number of CRDs a nifikop pod is actively watching

We can use a similar Metrics setup as i used in #154

mh013370 avatar Aug 25 '22 15:08 mh013370