Version v1.16 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.
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 occured 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 occured up to that instance of time while running an Ansible operator.
These metrics can be queried in the Prometheus UI.