From 6f5d51f78e7ebc3733f6312adf842cae65d3da92 Mon Sep 17 00:00:00 2001 From: Warren Fernandes Date: Wed, 13 Nov 2019 10:05:29 -0700 Subject: [PATCH] Add documentation for metrics Signed-off-by: Warren Fernandes --- docs/book/src/providers/v1alpha2-to-v1alpha3.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/book/src/providers/v1alpha2-to-v1alpha3.md b/docs/book/src/providers/v1alpha2-to-v1alpha3.md index 331835008a7f..75f67f62cf0c 100644 --- a/docs/book/src/providers/v1alpha2-to-v1alpha3.md +++ b/docs/book/src/providers/v1alpha2-to-v1alpha3.md @@ -60,7 +60,21 @@ - Previously examples and tests were setting/checking for the label to be set to `true`. - The function `util.IsControlPlaneMachine` was previously checking for any value other than empty string, while now we only check if the associated label exists. - + ## Machine `Status.Phase` field set to `Provisioned` if a NodeRef is set but infrastructure is not ready - The machine Status.Phase is set back to `Provisioned` if the infrastructure is not ready. This is only applicable if the infrastructure node status does not have any errors set. + +## Metrics + +- The cluster and machine controllers expose the following prometheus metrics. + - `capi_cluster_control_plane_ready`: Cluster control plane is ready if set to 1 and not if 0. + - `capi_cluster_infrastructure_ready`: Cluster infrastructure is ready if set to 1 and not if 0. + - `capi_cluster_kubeconfig_ready`: Cluster kubeconfig is ready if set to 1 and not if 0. + - `capi_cluster_error_set`: Cluster ErrorMesssage or ErrorReason is set if metric is 1. + - `capi_machine_bootstrap_ready`: Machine Boostrap is ready if set to 1 and not if 0. + - `capi_machine_infrastructure_ready`: Machine InfrastructureRef is ready if set to 1 and not if 0. + - `capi_machine_node_ready`: Machine NodeRef is ready if set to 1 and not if 0. + + They can be accessed by default via the `8080` metrics port on the cluster + api controller manager.