Skip to content

Commit e222e98

Browse files
internal metrics (#5011)
Signed-off-by: Venkat Ramaraju <[email protected]>
1 parent 60bfe2e commit e222e98

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
The Ansible Operator comes with three internal metrics that provide an insight to the frequency and time of operator reconciliations. These metrics can be
2+
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
3+
[Kubebuilder documentation](https://book.kubebuilder.io/reference/metrics.html) on publishing metrics.
4+
5+
The default metrics recorded in Operator SDK are collected in a [histogram](https://prometheus.io/docs/practices/histograms/).
6+
7+
The following three metrics are derived from the histogram:
8+
1. `ansible_operator_reconciles_bucket` - Each bucket in the histogram counts the number of reconciliations that have a period (in seconds) less than or equal
9+
to the upper limit of the bucket.
10+
3. `ansible_operator_reconciles_count` - The total number of reconciliations that have occured up to that instance of time while running an Ansible operator.
11+
4. `ansible_operator_reconciles_sum` - The cumulative amount of time (in seconds) of all reconciliations that have occured up to that instance of time while
12+
running an Ansible operator.
13+
14+
These metrics can be queried in the Prometheus UI.
15+
16+
![Screen Shot 2021-06-24 at 2 10 28 PM](https://user-images.githubusercontent.com/37827279/123332879-f0fb2900-d4f5-11eb-87ea-7afd04f35b1c.png)

0 commit comments

Comments
 (0)