Internal Operator Metrics
The Ansible Operator comes with three internal metrics that provide an insight to the frequency and time of operator reconciliations. These metrics can be scraped by a Prometheus instance or any other openmetrics system. To publish operator metrics and scrape them with an openmetrics system such as Prometheus, view Kubebuilder documentation on publishing metrics.
The default metrics recorded in Operator SDK are collected in a histogram.
The following three metrics are derived from the histogram:
ansible_operator_reconciles_bucket- Each bucket in the histogram counts the number of reconciliations that have a period (in seconds) less than or equal to the upper limit of the bucket.
ansible_operator_reconciles_count- The total number of reconciliations that have occurred up to that instance of time while running an Ansible operator.
ansible_operator_reconciles_sum- The cumulative amount of time (in seconds) of all reconciliations that have occurred up to that instance of time while running an Ansible operator.
These metrics can be queried in the Prometheus UI.
Last modified August 26, 2022: docs: fix Ansible metrics reference (#5886) (57f9b59b)