diff --git a/Makefile b/Makefile index 61736eaf5f..2701cad334 100644 --- a/Makefile +++ b/Makefile @@ -54,13 +54,13 @@ doccheck: generate validate-template @echo "- Checking if the generated documentation is up to date..." @git diff --exit-code @echo "- Checking if the documentation is in sync with the code..." - @grep -hoE -d skip '\| kube_[^ |]+' docs/* --exclude=README.md | sed -E 's/\| //g' | sort -u > documented_metrics + @grep -rhoE '\| kube_[^ |]+' docs/metrics/* --exclude=README.md | sed -E 's/\| //g' | sort -u > documented_metrics @find internal/store -type f -not -name '*_test.go' -exec sed -nE 's/.*"(kube_[^"]+)".*/\1/p' {} \; | sort -u > code_metrics @diff -u0 code_metrics documented_metrics || (echo "ERROR: Metrics with - are present in code but missing in documentation, metrics with + are documented but not found in code."; exit 1) @echo OK @rm -f code_metrics documented_metrics @echo "- Checking for orphan documentation files" - @cd docs; for doc in *.md; do if [ "$$doc" != "README.md" ] && ! grep -q "$$doc" *.md; then echo "ERROR: No link to documentation file $${doc} detected"; exit 1; fi; done + @cd docs; for doc in $$(find metrics/* -name '*.md' | sed 's/.*\///'); do if [ "$$doc" != "README.md" ] && ! grep -q "$$doc" *.md; then echo "ERROR: No link to documentation file $${doc} detected"; exit 1; fi; done @echo OK build-local: diff --git a/README.md b/README.md index 3ca0a8c53f..3f0874eb06 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ In a 100 node cluster scaling test the latency numbers were as follows: ### A note on costing -By default, kube-state-metrics exposes several metrics for events across your cluster. If you have a large number of frequently-updating resources on your cluster, you may find that a lot of data is ingested into these metrics. This can incur high costs on some cloud providers. Please take a moment to [configure what metrics you'd like to expose](docs/cli-arguments.md), as well as consult the documentation for your Kubernetes environment in order to avoid unexpectedly high costs. +By default, kube-state-metrics exposes several metrics for events across your cluster. If you have a large number of frequently-updating resources on your cluster, you may find that a lot of data is ingested into these metrics. This can incur high costs on some cloud providers. Please take a moment to [configure what metrics you'd like to expose](docs/developer/cli-arguments.md), as well as consult the documentation for your Kubernetes environment in order to avoid unexpectedly high costs. ### kube-state-metrics vs. metrics-server @@ -387,7 +387,7 @@ spec: - '--namespaces=project1' ``` -For the full list of arguments available, see the documentation in [docs/cli-arguments.md](./docs/cli-arguments.md) +For the full list of arguments available, see the documentation in [docs/developer/cli-arguments.md](./docs/developer/cli-arguments.md) #### Helm Chart diff --git a/README.md.tpl b/README.md.tpl index 18d498d521..932b186c12 100644 --- a/README.md.tpl +++ b/README.md.tpl @@ -205,7 +205,7 @@ In a 100 node cluster scaling test the latency numbers were as follows: ### A note on costing -By default, kube-state-metrics exposes several metrics for events across your cluster. If you have a large number of frequently-updating resources on your cluster, you may find that a lot of data is ingested into these metrics. This can incur high costs on some cloud providers. Please take a moment to [configure what metrics you'd like to expose](docs/cli-arguments.md), as well as consult the documentation for your Kubernetes environment in order to avoid unexpectedly high costs. +By default, kube-state-metrics exposes several metrics for events across your cluster. If you have a large number of frequently-updating resources on your cluster, you may find that a lot of data is ingested into these metrics. This can incur high costs on some cloud providers. Please take a moment to [configure what metrics you'd like to expose](docs/developer/cli-arguments.md), as well as consult the documentation for your Kubernetes environment in order to avoid unexpectedly high costs. ### kube-state-metrics vs. metrics-server @@ -388,7 +388,7 @@ spec: - '--namespaces=project1' ``` -For the full list of arguments available, see the documentation in [docs/cli-arguments.md](./docs/cli-arguments.md) +For the full list of arguments available, see the documentation in [docs/developer/cli-arguments.md](./docs/developer/cli-arguments.md) #### Helm Chart diff --git a/docs/README.md b/docs/README.md index e871e09c78..08d3f91118 100644 --- a/docs/README.md +++ b/docs/README.md @@ -32,44 +32,44 @@ See each file for specific documentation about the exposed metrics: ### Default Resources -* [CertificateSigningRequest Metrics](certificatesigningrequest-metrics.md) -* [ConfigMap Metrics](configmap-metrics.md) -* [CronJob Metrics](cronjob-metrics.md) -* [DaemonSet Metrics](daemonset-metrics.md) -* [Deployment Metrics](deployment-metrics.md) -* [Endpoint Metrics](endpoint-metrics.md) -* [Horizontal Pod Autoscaler Metrics](horizontalpodautoscaler-metrics.md) -* [Ingress Metrics](ingress-metrics.md) -* [Job Metrics](job-metrics.md) -* [Lease Metrics](lease-metrics.md) -* [LimitRange Metrics](limitrange-metrics.md) -* [MutatingWebhookConfiguration Metrics](mutatingwebhookconfiguration-metrics.md) -* [Namespace Metrics](namespace-metrics.md) -* [NetworkPolicy Metrics](networkpolicy-metrics.md) -* [Node Metrics](node-metrics.md) -* [PersistentVolume Metrics](persistentvolume-metrics.md) -* [PersistentVolumeClaim Metrics](persistentvolumeclaim-metrics.md) -* [Pod Disruption Budget Metrics](poddisruptionbudget-metrics.md) -* [Pod Metrics](pod-metrics.md) -* [ReplicaSet Metrics](replicaset-metrics.md) -* [ReplicationController Metrics](replicationcontroller-metrics.md) -* [ResourceQuota Metrics](resourcequota-metrics.md) -* [Secret Metrics](secret-metrics.md) -* [Service Metrics](service-metrics.md) -* [StatefulSet Metrics](statefulset-metrics.md) -* [StorageClass Metrics](storageclass-metrics.md) -* [ValidatingWebhookConfiguration Metrics](validatingwebhookconfiguration-metrics.md) -* [VolumeAttachment Metrics](volumeattachment-metrics.md) +* [CertificateSigningRequest Metrics](metrics/auth/certificatesigningrequest-metrics.md) +* [ConfigMap Metrics](metrics/storage/configmap-metrics.md) +* [CronJob Metrics](metrics/workload/cronjob-metrics.md) +* [DaemonSet Metrics](metrics/workload/daemonset-metrics.md) +* [Deployment Metrics](metrics/workload/deployment-metrics.md) +* [Endpoint Metrics](metrics/service/endpoint-metrics.md) +* [Horizontal Pod Autoscaler Metrics](metrics/workload/horizontalpodautoscaler-metrics.md) +* [Ingress Metrics](metrics/service/ingress-metrics.md) +* [Job Metrics](metrics/workload/job-metrics.md) +* [Lease Metrics](metrics/cluster/lease-metrics.md) +* [LimitRange Metrics](metrics/policy/limitrange-metrics.md) +* [MutatingWebhookConfiguration Metrics](metrics/extend/mutatingwebhookconfiguration-metrics.md) +* [Namespace Metrics](metrics/cluster/namespace-metrics.md) +* [NetworkPolicy Metrics](metrics/policy/networkpolicy-metrics.md) +* [Node Metrics](metrics/cluster/node-metrics.md) +* [PersistentVolume Metrics](metrics/storage/persistentvolume-metrics.md) +* [PersistentVolumeClaim Metrics](metrics/storage/persistentvolumeclaim-metrics.md) +* [Pod Disruption Budget Metrics](metrics/policy/poddisruptionbudget-metrics.md) +* [Pod Metrics](metrics/workload/pod-metrics.md) +* [ReplicaSet Metrics](metrics/workload/replicaset-metrics.md) +* [ReplicationController Metrics](metrics/workload/replicationcontroller-metrics.md) +* [ResourceQuota Metrics](metrics/policy/resourcequota-metrics.md) +* [Secret Metrics](metrics/storage/secret-metrics.md) +* [Service Metrics](metrics/service/service-metrics.md) +* [StatefulSet Metrics](metrics/workload/statefulset-metrics.md) +* [StorageClass Metrics](metrics/storage/storageclass-metrics.md) +* [ValidatingWebhookConfiguration Metrics](metrics/extend/validatingwebhookconfiguration-metrics.md) +* [VolumeAttachment Metrics](metrics/storage/volumeattachment-metrics.md) ### Optional Resources -* [ClusterRole Metrics](clusterrole-metrics.md) -* [ClusterRoleBinding Metrics](clusterrolebinding-metrics.md) -* [EndpointSlice Metrics](endpointslice-metrics.md) -* [IngressClass Metrics](ingressclass-metrics.md) -* [Role Metrics](role-metrics.md) -* [RoleBinding Metrics](rolebinding-metrics.md) -* [ServiceAccount Metrics](serviceaccount-metrics.md) +* [ClusterRole Metrics](metrics/cluster/clusterrole-metrics.md) +* [ClusterRoleBinding Metrics](metrics/cluster/clusterrolebinding-metrics.md) +* [EndpointSlice Metrics](metrics/service/endpointslice-metrics.md) +* [IngressClass Metrics](metrics/service/ingressclass-metrics.md) +* [Role Metrics](metrics/auth/role-metrics.md) +* [RoleBinding Metrics](metrics/auth/rolebinding-metrics.md) +* [ServiceAccount Metrics](metrics/auth/serviceaccount-metrics.md) ## Join Metrics @@ -92,8 +92,8 @@ sum(kube_pod_container_resource_requests{resource="memory"}) by (namespace, pod, ## Metrics from Custom Resources -See [Custom Resource State Metrics](customresourcestate-metrics.md) for experimental support for custom resources. +See [Custom Resource State Metrics](metrics/extend/customresourcestate-metrics.md) for experimental support for custom resources. ## CLI Arguments -Additionally, options for `kube-state-metrics` can be passed when executing as a CLI, or in a kubernetes / openshift environment. More information can be found here: [CLI Arguments](cli-arguments.md) +Additionally, options for `kube-state-metrics` can be passed when executing as a CLI, or in a kubernetes / openshift environment. More information can be found here: [CLI Arguments](developer/cli-arguments.md) diff --git a/docs/cli-arguments.md b/docs/developer/cli-arguments.md similarity index 99% rename from docs/cli-arguments.md rename to docs/developer/cli-arguments.md index 4644daff42..1918a7e4e8 100644 --- a/docs/cli-arguments.md +++ b/docs/developer/cli-arguments.md @@ -23,7 +23,7 @@ spec: -[embedmd]:# (../help.txt) +[embedmd]:# (../../help.txt) ```txt $ kube-state-metrics -h kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects. diff --git a/docs/developer/guide.md b/docs/developer/guide.md index b93f715001..276a676874 100644 --- a/docs/developer/guide.md +++ b/docs/developer/guide.md @@ -12,15 +12,15 @@ Any contribution to improving this documentation will be appreciated. The following steps are needed to introduce a new resource and its respective resource metrics. -* Reference your new resource(s) to the [docs/README.md](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/README.md#exposed-metrics). -* Reference your new resource(s) in the [docs/cli-arguments.md](https://github.com/kubernetes/kube-state-metrics/blob/main/docs/cli-arguments.md#available-options) as part of the `--resources` flag. -* Create a new `.md` in the [docs](https://github.com/kubernetes/kube-state-metrics/tree/main/docs) directory to provide documentation on the resource(s) and metrics you implemented. Follow the formatting of all other resources. -* Add the resource(s) you are representing to the [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](https://github.com/kubernetes/kube-state-metrics/blob/main/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet) under the appropriate `apiGroup` using the `verbs`: `list` and `watch`. -* Run `make examples/standard`, this should re-generate [examples/standard/cluster-role.yaml](https://github.com/kubernetes/kube-state-metrics/blob/main/examples/standard/cluster-role.yaml) with the resource(s) added to [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](https://github.com/kubernetes/kube-state-metrics/blob/main/jsonnet/kube-state-metrics/kube-state-metrics.libsonnet). -* Reference and add build functions for the new resource(s) in [internal/store/builder.go](https://github.com/kubernetes/kube-state-metrics/blob/main/internal/store/builder.go). -* Reference the new resource in [pkg/options/resource.go](https://github.com/kubernetes/kube-state-metrics/blob/main/pkg/options/resource.go). -* Add a sample Kubernetes manifest to be used by tests in the [tests/manifests/](https://github.com/kubernetes/kube-state-metrics/tree/main/tests/manifests) directory. -* Lastly, and most importantly, actually implement your new resource(s) and its test binary in [internal/store](https://github.com/kubernetes/kube-state-metrics/tree/main/internal/store). Follow the formatting and structure of other resources. +* Reference your new resource(s) to the [docs/README.md](./../README.md#exposed-metrics). +* Reference your new resource(s) in the [docs/developer/cli-arguments.md](./cli-arguments.md#available-options) as part of the `--resources` flag. +* Create a new `.md` in the [docs](./../docs) directory to provide documentation on the resource(s) and metrics you implemented. Follow the formatting of all other resources. +* Add the resource(s) you are representing to the [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](./../../jsonnet/kube-state-metrics/kube-state-metrics.libsonnet) under the appropriate `apiGroup` using the `verbs`: `list` and `watch`. +* Run `make examples/standard`, this should re-generate [examples/standard/cluster-role.yaml](./../../examples/standard/cluster-role.yaml) with the resource(s) added to [jsonnet/kube-state-metrics/kube-state-metrics.libsonnet](./../../jsonnet/kube-state-metrics/kube-state-metrics.libsonnet). +* Reference and add build functions for the new resource(s) in [internal/store/builder.go](./../../internal/store/builder.go). +* Reference the new resource in [pkg/options/resource.go](./../../pkg/options/resource.go). +* Add a sample Kubernetes manifest to be used by tests in the [tests/manifests/](./../../tests/manifests) directory. +* Lastly, and most importantly, actually implement your new resource(s) and its test binary in [internal/store](./../../internal/store). Follow the formatting and structure of other resources. ### Add New Metrics diff --git a/docs/certificatesigningrequest-metrics.md b/docs/metrics/auth/certificatesigningrequest-metrics.md similarity index 80% rename from docs/certificatesigningrequest-metrics.md rename to docs/metrics/auth/certificatesigningrequest-metrics.md index 5b13722b64..ffc013db8a 100644 --- a/docs/certificatesigningrequest-metrics.md +++ b/docs/metrics/auth/certificatesigningrequest-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_certificatesigningrequest_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `certificatesigningrequest`=<certificatesigningrequest-name>
`signer_name`=<certificatesigningrequest-signer-name> | EXPERIMENTAL | +| kube_certificatesigningrequest_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `certificatesigningrequest`=<certificatesigningrequest-name>
`signer_name`=<certificatesigningrequest-signer-name> | EXPERIMENTAL | | kube_certificatesigningrequest_created | Gauge | | `certificatesigningrequest`=<certificatesigningrequest-name>
`signer_name`=<certificatesigningrequest-signer-name> | STABLE | | kube_certificatesigningrequest_condition | Gauge | | `certificatesigningrequest`=<certificatesigningrequest-name>
`signer_name`=<certificatesigningrequest-signer-name>
`condition`=<approved\|denied> | STABLE | -| kube_certificatesigningrequest_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `certificatesigningrequest`=<certificatesigningrequest-name>
`signer_name`=<certificatesigningrequest-signer-name> | STABLE | +| kube_certificatesigningrequest_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `certificatesigningrequest`=<certificatesigningrequest-name>
`signer_name`=<certificatesigningrequest-signer-name> | STABLE | | kube_certificatesigningrequest_cert_length | Gauge | | `certificatesigningrequest`=<certificatesigningrequest-name>
`signer_name`=<certificatesigningrequest-signer-name> | STABLE | diff --git a/docs/role-metrics.md b/docs/metrics/auth/role-metrics.md similarity index 84% rename from docs/role-metrics.md rename to docs/metrics/auth/role-metrics.md index 34e31e14f4..1c9e4be2af 100644 --- a/docs/role-metrics.md +++ b/docs/metrics/auth/role-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ----------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------ | -| kube_role_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `role`=<role-name>
`namespace`=<role-namespace> | EXPERIMENTAL | -| kube_role_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `role`=<role-name>
`namespace`=<role-namespace> | EXPERIMENTAL | +| kube_role_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `role`=<role-name>
`namespace`=<role-namespace> | EXPERIMENTAL | +| kube_role_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `role`=<role-name>
`namespace`=<role-namespace> | EXPERIMENTAL | | kube_role_info | Gauge | | `role`=<role-name>
`namespace`=<role-namespace> | EXPERIMENTAL | | kube_role_created | Gauge | | `role`=<role-name>
`namespace`=<role-namespace> | EXPERIMENTAL | | kube_role_metadata_resource_version | Gauge | | `role`=<role-name>
`namespace`=<role-namespace> | EXPERIMENTAL | diff --git a/docs/rolebinding-metrics.md b/docs/metrics/auth/rolebinding-metrics.md similarity index 80% rename from docs/rolebinding-metrics.md rename to docs/metrics/auth/rolebinding-metrics.md index 19e09e8c63..cf67bc05a7 100644 --- a/docs/rolebinding-metrics.md +++ b/docs/metrics/auth/rolebinding-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_rolebinding_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `rolebinding`=<rolebinding-name>
`namespace`=<rolebinding-namespace> | EXPERIMENTAL | -| kube_rolebinding_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `rolebinding`=<rolebinding-name>
`namespace`=<rolebinding-namespace> | EXPERIMENTAL | +| kube_rolebinding_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `rolebinding`=<rolebinding-name>
`namespace`=<rolebinding-namespace> | EXPERIMENTAL | +| kube_rolebinding_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `rolebinding`=<rolebinding-name>
`namespace`=<rolebinding-namespace> | EXPERIMENTAL | | kube_rolebinding_info | Gauge | | `rolebinding`=<rolebinding-name>
`namespace`=<rolebinding-namespace>
`roleref_kind`=<role-kind>
`roleref_name`=<role-name> | EXPERIMENTAL | | kube_rolebinding_created | Gauge | | `rolebinding`=<rolebinding-name>
`namespace`=<rolebinding-namespace> | EXPERIMENTAL | | kube_rolebinding_metadata_resource_version | Gauge | | `rolebinding`=<rolebinding-name>
`namespace`=<rolebinding-namespace> | EXPERIMENTAL | diff --git a/docs/serviceaccount-metrics.md b/docs/metrics/auth/serviceaccount-metrics.md similarity index 83% rename from docs/serviceaccount-metrics.md rename to docs/metrics/auth/serviceaccount-metrics.md index 303b2a31f7..a7ec4704b6 100644 --- a/docs/serviceaccount-metrics.md +++ b/docs/metrics/auth/serviceaccount-metrics.md @@ -7,5 +7,5 @@ | kube_serviceaccount_deleted | Gauge | Unix deletion timestamp | | `namespace`=<serviceaccount-namespace>
`serviceaccount`=<serviceaccount-name>
`uid`=<serviceaccount-uid> | EXPERIMENTAL | | kube_serviceaccount_secret | Gauge | Secret being referenced by a service account | | `namespace`=<serviceaccount-namespace>
`serviceaccount`=<serviceaccount-name>
`uid`=<serviceaccount-uid>
`name`=<secret-name> | EXPERIMENTAL | | kube_serviceaccount_image_pull_secret | Gauge | Secret being referenced by a service account for the purpose of pulling images | | `namespace`=<serviceaccount-namespace>
`serviceaccount`=<serviceaccount-name>
`uid`=<serviceaccount-uid>
`name`=<secret-name> | EXPERIMENTAL | -| kube_serviceaccount_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | | `namespace`=<serviceaccount-namespace>
`serviceaccount`=<serviceaccount-name>
`uid`=<serviceaccount-uid>
`annotation_SERVICE_ACCOUNT_ANNOTATION`=<SERVICE_ACCOUNT_ANNOTATION> | EXPERIMENTAL | -| kube_serviceaccount_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | | `namespace`=<serviceaccount-namespace>
`serviceaccount`=<serviceaccount-name>
`uid`=<serviceaccount-uid>
`label_SERVICE_ACCOUNT_LABEL`=<SERVICE_ACCOUNT_LABEL> | EXPERIMENTAL | +| kube_serviceaccount_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | | `namespace`=<serviceaccount-namespace>
`serviceaccount`=<serviceaccount-name>
`uid`=<serviceaccount-uid>
`annotation_SERVICE_ACCOUNT_ANNOTATION`=<SERVICE_ACCOUNT_ANNOTATION> | EXPERIMENTAL | +| kube_serviceaccount_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | | `namespace`=<serviceaccount-namespace>
`serviceaccount`=<serviceaccount-name>
`uid`=<serviceaccount-uid>
`label_SERVICE_ACCOUNT_LABEL`=<SERVICE_ACCOUNT_LABEL> | EXPERIMENTAL | diff --git a/docs/clusterrole-metrics.md b/docs/metrics/cluster/clusterrole-metrics.md similarity index 85% rename from docs/clusterrole-metrics.md rename to docs/metrics/cluster/clusterrole-metrics.md index 828a38704d..ef930a5960 100644 --- a/docs/clusterrole-metrics.md +++ b/docs/metrics/cluster/clusterrole-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ------------ | -| kube_clusterrole_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `clusterrole`=<clusterrole-name> | EXPERIMENTAL | -| kube_clusterrole_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `clusterrole`=<clusterrole-name> | EXPERIMENTAL | +| kube_clusterrole_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `clusterrole`=<clusterrole-name> | EXPERIMENTAL | +| kube_clusterrole_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `clusterrole`=<clusterrole-name> | EXPERIMENTAL | | kube_clusterrole_info | Gauge | | `clusterrole`=<clusterrole-name> | EXPERIMENTAL | | kube_clusterrole_created | Gauge | | `clusterrole`=<clusterrole-name> | EXPERIMENTAL | | kube_clusterrole_metadata_resource_version | Gauge | | `clusterrole`=<clusterrole-name> | EXPERIMENTAL | diff --git a/docs/clusterrolebinding-metrics.md b/docs/metrics/cluster/clusterrolebinding-metrics.md similarity index 81% rename from docs/clusterrolebinding-metrics.md rename to docs/metrics/cluster/clusterrolebinding-metrics.md index b1bda5130d..07020f1b5f 100644 --- a/docs/clusterrolebinding-metrics.md +++ b/docs/metrics/cluster/clusterrolebinding-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_clusterrolebinding_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | -| kube_clusterrolebinding_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | +| kube_clusterrolebinding_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | +| kube_clusterrolebinding_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | | kube_clusterrolebinding_info | Gauge | | `clusterrolebinding`=<clusterrolebinding-name>
`roleref_kind`=<role-kind>
`roleref_name`=<role-name> | EXPERIMENTAL | | kube_clusterrolebinding_created | Gauge | | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | | kube_clusterrolebinding_metadata_resource_version | Gauge | | `clusterrolebinding`=<clusterrolebinding-name> | EXPERIMENTAL | diff --git a/docs/lease-metrics.md b/docs/metrics/cluster/lease-metrics.md similarity index 100% rename from docs/lease-metrics.md rename to docs/metrics/cluster/lease-metrics.md diff --git a/docs/namespace-metrics.md b/docs/metrics/cluster/namespace-metrics.md similarity index 84% rename from docs/namespace-metrics.md rename to docs/metrics/cluster/namespace-metrics.md index a3630a0178..d5dac41506 100644 --- a/docs/namespace-metrics.md +++ b/docs/metrics/cluster/namespace-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_namespace_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `namespace`=<namespace-name>
`label_NS_ANNOTATION`=<NS_ANNOTATION> | EXPERIMENTAL | +| kube_namespace_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `namespace`=<namespace-name>
`label_NS_ANNOTATION`=<NS_ANNOTATION> | EXPERIMENTAL | | kube_namespace_created | Gauge | | `namespace`=<namespace-name> | STABLE | -| kube_namespace_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `namespace`=<namespace-name>
`label_NS_LABEL`=<NS_LABEL> | STABLE | +| kube_namespace_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `namespace`=<namespace-name>
`label_NS_LABEL`=<NS_LABEL> | STABLE | | kube_namespace_status_condition | Gauge | | `namespace`=<namespace-name>
`condition`=<NamespaceDeletionDiscoveryFailure\|NamespaceDeletionContentFailure\|NamespaceDeletionGroupVersionParsingFailure>
`status`=<true\|false\|unknown> | EXPERIMENTAL | | kube_namespace_status_phase | Gauge | | `namespace`=<namespace-name>
`phase`=<Active\|Terminating> | STABLE | diff --git a/docs/node-metrics.md b/docs/metrics/cluster/node-metrics.md similarity index 94% rename from docs/node-metrics.md rename to docs/metrics/cluster/node-metrics.md index 2aeb9f2202..ac1085bf8e 100644 --- a/docs/node-metrics.md +++ b/docs/metrics/cluster/node-metrics.md @@ -2,9 +2,9 @@ | Metric name | Metric type | Description | Unit (where applicable) | Labels/tags | Status | | ---------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_node_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | | `node`=<node-address>
`annotation_NODE_ANNOTATION`=<NODE_ANNOTATION> | EXPERIMENTAL | +| kube_node_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | | `node`=<node-address>
`annotation_NODE_ANNOTATION`=<NODE_ANNOTATION> | EXPERIMENTAL | | kube_node_info | Gauge | Information about a cluster node | | `node`=<node-address>
`kernel_version`=<kernel-version>
`os_image`=<os-image-name>
`container_runtime_version`=<container-runtime-and-version-combination>
`kubelet_version`=<kubelet-version>
`kubeproxy_version`=<kubeproxy-version>
`pod_cidr`=<pod-cidr>
`provider_id`=<provider-id>
`system_uuid`=<system-uuid>
`internal_ip`=<internal-ip> | STABLE | -| kube_node_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | | `node`=<node-address>
`label_NODE_LABEL`=<NODE_LABEL> | STABLE | +| kube_node_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | | `node`=<node-address>
`label_NODE_LABEL`=<NODE_LABEL> | STABLE | | kube_node_role | Gauge | The role of a cluster node | | `node`=<node-address>
`role`=<NODE_ROLE> | EXPERIMENTAL | | kube_node_spec_unschedulable | Gauge | Whether a node can schedule new pods | | `node`=<node-address> | STABLE | | kube_node_spec_taint | Gauge | The taint of a cluster node. | | `node`=<node-address>
`key`=<taint-key>
`value=`<taint-value>
`effect=`<taint-effect> | STABLE | diff --git a/docs/customresourcestate-metrics.md b/docs/metrics/extend/customresourcestate-metrics.md similarity index 100% rename from docs/customresourcestate-metrics.md rename to docs/metrics/extend/customresourcestate-metrics.md diff --git a/docs/mutatingwebhookconfiguration-metrics.md b/docs/metrics/extend/mutatingwebhookconfiguration-metrics.md similarity index 100% rename from docs/mutatingwebhookconfiguration-metrics.md rename to docs/metrics/extend/mutatingwebhookconfiguration-metrics.md diff --git a/docs/validatingwebhookconfiguration-metrics.md b/docs/metrics/extend/validatingwebhookconfiguration-metrics.md similarity index 100% rename from docs/validatingwebhookconfiguration-metrics.md rename to docs/metrics/extend/validatingwebhookconfiguration-metrics.md diff --git a/docs/limitrange-metrics.md b/docs/metrics/policy/limitrange-metrics.md similarity index 100% rename from docs/limitrange-metrics.md rename to docs/metrics/policy/limitrange-metrics.md diff --git a/docs/networkpolicy-metrics.md b/docs/metrics/policy/networkpolicy-metrics.md similarity index 83% rename from docs/networkpolicy-metrics.md rename to docs/metrics/policy/networkpolicy-metrics.md index 0ceeb1e141..8ed494350e 100644 --- a/docs/networkpolicy-metrics.md +++ b/docs/metrics/policy/networkpolicy-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------ | -| kube_networkpolicy_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | +| kube_networkpolicy_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | | kube_networkpolicy_created | Gauge | | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | -| kube_networkpolicy_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | +| kube_networkpolicy_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | | kube_networkpolicy_spec_egress_rules | Gauge | | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | | kube_networkpolicy_spec_ingress_rules | Gauge | | `namespace`=<namespace name> `networkpolicy`=<networkpolicy name> | EXPERIMENTAL | diff --git a/docs/poddisruptionbudget-metrics.md b/docs/metrics/policy/poddisruptionbudget-metrics.md similarity index 85% rename from docs/poddisruptionbudget-metrics.md rename to docs/metrics/policy/poddisruptionbudget-metrics.md index c907a97d9e..2e8fb1179a 100644 --- a/docs/poddisruptionbudget-metrics.md +++ b/docs/metrics/policy/poddisruptionbudget-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_poddisruptionbudget_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `poddisruptionbudget`=<poddisruptionbudget-name>
`namespace`=<poddisruptionbudget-namespace>
`annotation_PODDISRUPTIONBUDGET_ANNOTATION`=<PODDISRUPTIONBUDGET_ANNOATION> | EXPERIMENTAL | -| kube_poddisruptionbudget_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `poddisruptionbudget`=<poddisruptionbudget-name>
`namespace`=<poddisruptionbudget-namespace>
`label_PODDISRUPTIONBUDGET_LABEL`=<PODDISRUPTIONBUDGET_ANNOATION> | EXPERIMENTAL | +| kube_poddisruptionbudget_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `poddisruptionbudget`=<poddisruptionbudget-name>
`namespace`=<poddisruptionbudget-namespace>
`annotation_PODDISRUPTIONBUDGET_ANNOTATION`=<PODDISRUPTIONBUDGET_ANNOATION> | EXPERIMENTAL | +| kube_poddisruptionbudget_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `poddisruptionbudget`=<poddisruptionbudget-name>
`namespace`=<poddisruptionbudget-namespace>
`label_PODDISRUPTIONBUDGET_LABEL`=<PODDISRUPTIONBUDGET_ANNOATION> | EXPERIMENTAL | | kube_poddisruptionbudget_created | Gauge | | `poddisruptionbudget`=<pdb-name>
`namespace`=<pdb-namespace> | STABLE | | kube_poddisruptionbudget_status_current_healthy | Gauge | | `poddisruptionbudget`=<pdb-name>
`namespace`=<pdb-namespace> | STABLE | | kube_poddisruptionbudget_status_desired_healthy | Gauge | | `poddisruptionbudget`=<pdb-name>
`namespace`=<pdb-namespace> | STABLE | diff --git a/docs/resourcequota-metrics.md b/docs/metrics/policy/resourcequota-metrics.md similarity index 78% rename from docs/resourcequota-metrics.md rename to docs/metrics/policy/resourcequota-metrics.md index 845759c779..3a68fdae29 100644 --- a/docs/resourcequota-metrics.md +++ b/docs/metrics/policy/resourcequota-metrics.md @@ -4,5 +4,5 @@ | ------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | | kube_resourcequota | Gauge | | `resourcequota`=<quota-name>
`namespace`=<namespace>
`resource`=<ResourceName>
`type`=<quota-type> | STABLE | | kube_resourcequota_created | Gauge | | `resourcequota`=<quota-name>
`namespace`=<namespace> | STABLE | -| kube_resourcequota_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `resourcequota`=<quota-name>
`namespace`=<namespace>
`annotation_RESOURCE_QUOTA_ANNOTATION`=<RESOURCE_QUOTA_ANNOTATION> | EXPERIMENTAL | -| kube_resourcequota_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `resourcequota`=<quota-name>
`namespace`=<namespace>
`label_RESOURCE_QUOTA_LABEL`=<RESOURCE_QUOTA_LABEL> | EXPERIMENTAL | +| kube_resourcequota_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `resourcequota`=<quota-name>
`namespace`=<namespace>
`annotation_RESOURCE_QUOTA_ANNOTATION`=<RESOURCE_QUOTA_ANNOTATION> | EXPERIMENTAL | +| kube_resourcequota_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `resourcequota`=<quota-name>
`namespace`=<namespace>
`label_RESOURCE_QUOTA_LABEL`=<RESOURCE_QUOTA_LABEL> | EXPERIMENTAL | diff --git a/docs/endpoint-metrics.md b/docs/metrics/service/endpoint-metrics.md similarity index 87% rename from docs/endpoint-metrics.md rename to docs/metrics/service/endpoint-metrics.md index 7d524cd1f3..4845988bdd 100644 --- a/docs/endpoint-metrics.md +++ b/docs/metrics/service/endpoint-metrics.md @@ -2,11 +2,11 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_endpoint_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace>
`annotation_ENDPOINT_ANNOTATION`=<ENDPOINT_ANNOTATION> | EXPERIMENTAL | +| kube_endpoint_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace>
`annotation_ENDPOINT_ANNOTATION`=<ENDPOINT_ANNOTATION> | EXPERIMENTAL | | kube_endpoint_address_not_ready | Gauge | | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace> | DEPRECATED | | kube_endpoint_address_available | Gauge | | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace> | DEPRECATED | | kube_endpoint_info | Gauge | | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace> | STABLE | -| kube_endpoint_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace>
`label_ENDPOINT_LABEL`=<ENDPOINT_LABEL> | STABLE | +| kube_endpoint_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace>
`label_ENDPOINT_LABEL`=<ENDPOINT_LABEL> | STABLE | | kube_endpoint_created | Gauge | | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace> | STABLE | | kube_endpoint_ports | Gauge | | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace>
`port_name`=<endpoint-port-name>
`port_protocol`=<endpoint-port-protocol>
`port_number`=<endpoint-port-number> | STABLE | | kube_endpoint_address | Gauge | | `endpoint`=<endpoint-name>
`namespace`=<endpoint-namespace>
`ip`=<endpoint-ip>
`ready`=<true if available, false if unavailalbe> | STABLE | diff --git a/docs/endpointslice-metrics.md b/docs/metrics/service/endpointslice-metrics.md similarity index 90% rename from docs/endpointslice-metrics.md rename to docs/metrics/service/endpointslice-metrics.md index 9b914e3544..e54014ed4e 100644 --- a/docs/endpointslice-metrics.md +++ b/docs/metrics/service/endpointslice-metrics.md @@ -2,10 +2,10 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_endpointslice_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace>
`annotation_ENDPOINTSLICE_ANNOTATION`=<ENDPOINTSLICE_ANNOTATION> | EXPERIMENTAL | +| kube_endpointslice_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace>
`annotation_ENDPOINTSLICE_ANNOTATION`=<ENDPOINTSLICE_ANNOTATION> | EXPERIMENTAL | | kube_endpointslice_info | Gauge | | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace> | EXPERIMENTAL | | kube_endpointslice_ports | Gauge | | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace>
`port_name`=<endpointslice-port-name>
`port_protocol`=<endpointslice-port-protocol>
`port_number`=<endpointslice-port-number> | EXPERIMENTAL | | kube_endpointslice_endpoints | Gauge | | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace>
`ready`=<endpointslice-ready>
`serving`=<endpointslice-serving>
`terminating`=<endpointslice-terminating>
`hostname`=<endpointslice-hostname>
`targetref_kind`=<endpointslice-targetref-kind>
`targetref_name`=<endpointslice-targetref-name>
`targetref_namespace`=<endpointslice-targetref-namespace>
`nodename`=<endpointslice-nodename>
`endpoint_zone`=<endpointslice-zone> | EXPERIMENTAL | | kube_endpointslice_endpoints_hints | Gauge | Each line is a hint applied to an endpoint-slice | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace>
`address`=<endpointslice-address[0]>
`for_zone`=<endpointslice-hint> | EXPERIMENTAL | -| kube_endpointslice_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace>
`label_ENDPOINTSLICE_LABEL`=<ENDPOINTSLICE_LABEL> | EXPERIMENTAL | +| kube_endpointslice_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace>
`label_ENDPOINTSLICE_LABEL`=<ENDPOINTSLICE_LABEL> | EXPERIMENTAL | | kube_endpointslice_created | Gauge | | `endpointslice`=<endpointslice-name>
`namespace`=<endpointslice-namespace> | EXPERIMENTAL | diff --git a/docs/ingress-metrics.md b/docs/metrics/service/ingress-metrics.md similarity index 90% rename from docs/ingress-metrics.md rename to docs/metrics/service/ingress-metrics.md index b11bc3dee3..61faf115d3 100644 --- a/docs/ingress-metrics.md +++ b/docs/metrics/service/ingress-metrics.md @@ -2,9 +2,9 @@ | Metric name | Metric type | Description | Labels/tags | Status | | -------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_ingress_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `ingress`=<ingress-name>
`namespace`=<ingress-namespace>
`annotation_INGRESS_ANNOTATION`=<ANNOTATION_LABEL> | EXPERIMENTAL | +| kube_ingress_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `ingress`=<ingress-name>
`namespace`=<ingress-namespace>
`annotation_INGRESS_ANNOTATION`=<ANNOTATION_LABEL> | EXPERIMENTAL | | kube_ingress_info | Gauge | | `ingress`=<ingress-name>
`namespace`=<ingress-namespace>
`ingressclass`=<ingress-class> or `_default` if not set | STABLE | -| kube_ingress_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `ingress`=<ingress-name>
`namespace`=<ingress-namespace>
`label_INGRESS_LABEL`=<INGRESS_LABEL> | STABLE | +| kube_ingress_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `ingress`=<ingress-name>
`namespace`=<ingress-namespace>
`label_INGRESS_LABEL`=<INGRESS_LABEL> | STABLE | | kube_ingress_created | Gauge | | `ingress`=<ingress-name>
`namespace`=<ingress-namespace> | STABLE | | kube_ingress_metadata_resource_version | Gauge | | `ingress`=<ingress-name>
`namespace`=<ingress-namespace> | EXPERIMENTAL | | kube_ingress_path | Gauge | | `ingress`=<ingress-name>
`namespace`=<ingress-namespace>
`host`=<ingress-host>
`path`=<ingress-path>
If path served by Service Backend
`service_name`=<service name for the path>
`service_port`=<service port for the path>
If path served by Resource Backend
`resource_api_group`=<resource backend api group>
`resource_kind`=<resource backend kind>
`resource_name`=<resource backend name> | STABLE | diff --git a/docs/ingressclass-metrics.md b/docs/metrics/service/ingressclass-metrics.md similarity index 79% rename from docs/ingressclass-metrics.md rename to docs/metrics/service/ingressclass-metrics.md index af1b343eaf..fbb6097db4 100644 --- a/docs/ingressclass-metrics.md +++ b/docs/metrics/service/ingressclass-metrics.md @@ -2,7 +2,7 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ----------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------ | -| kube_ingressclass_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `ingressclass`=<ingressclass-name>
`annotation_INGRESSCLASS_ANNOTATION`=<INGRESSCLASS_ANNOTATION> | EXPERIMENTAL | +| kube_ingressclass_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `ingressclass`=<ingressclass-name>
`annotation_INGRESSCLASS_ANNOTATION`=<INGRESSCLASS_ANNOTATION> | EXPERIMENTAL | | kube_ingressclass_info | Gauge | | `ingressclass`=<ingressclass-name>
`controller`=<ingress-controller-name>
| EXPERIMENTAL | -| kube_ingressclass_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `ingressclass`=<ingressclass-name>
`label_INGRESSCLASS_LABEL`=<INGRESSCLASS_LABEL> | EXPERIMENTAL | +| kube_ingressclass_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `ingressclass`=<ingressclass-name>
`label_INGRESSCLASS_LABEL`=<INGRESSCLASS_LABEL> | EXPERIMENTAL | | kube_ingressclass_created | Gauge | | `ingressclass`=<ingressclass-name> | EXPERIMENTAL | diff --git a/docs/service-metrics.md b/docs/metrics/service/service-metrics.md similarity index 84% rename from docs/service-metrics.md rename to docs/metrics/service/service-metrics.md index 03241f86fa..fc68d3b409 100644 --- a/docs/service-metrics.md +++ b/docs/metrics/service/service-metrics.md @@ -2,9 +2,9 @@ | Metric name | Metric type | Description | Unit (where applicable) | Labels/tags | Status | | ----------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_service_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid>
`annotation_SERVICE_ANNOTATION`=<SERVICE_ANNOTATION> | EXPERIMENTAL | +| kube_service_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid>
`annotation_SERVICE_ANNOTATION`=<SERVICE_ANNOTATION> | EXPERIMENTAL | | kube_service_info | Gauge | Information about service | | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid>
`cluster_ip`=<service cluster ip>
`external_name`=<service external name>
`load_balancer_ip`=<service load balancer ip> | STABLE | -| kube_service_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid>
`label_SERVICE_LABEL`=<SERVICE_LABEL> | STABLE | +| kube_service_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid>
`label_SERVICE_LABEL`=<SERVICE_LABEL> | STABLE | | kube_service_created | Gauge | Unix creation timestamp | seconds | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid> | STABLE | | kube_service_spec_type | Gauge | Type about service | | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid>
`type`=<ClusterIP\|NodePort\|LoadBalancer\|ExternalName> | STABLE | | kube_service_spec_external_ip | Gauge | Service external ips. One series for each ip | | `service`=<service-name>
`namespace`=<service-namespace>
`uid`=<service-uid>
`external_ip`=<external-ip> | STABLE | diff --git a/docs/configmap-metrics.md b/docs/metrics/storage/configmap-metrics.md similarity index 81% rename from docs/configmap-metrics.md rename to docs/metrics/storage/configmap-metrics.md index baef9a2e55..063af2c4b3 100644 --- a/docs/configmap-metrics.md +++ b/docs/metrics/storage/configmap-metrics.md @@ -2,8 +2,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ---------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_configmap_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `configmap`=<configmap-name>
`namespace`=<configmap-namespace>
`annotation_CONFIGMAP_ANNOTATION`=<CONFIGMAP_ANNOTATION> | EXPERIMENTAL | -| kube_configmap_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `configmap`=<configmap-name>
`namespace`=<configmap-namespace>
`label_CONFIGMAP_LABEL`=<CONFIGMAP_LABEL> | STABLE | +| kube_configmap_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `configmap`=<configmap-name>
`namespace`=<configmap-namespace>
`annotation_CONFIGMAP_ANNOTATION`=<CONFIGMAP_ANNOTATION> | EXPERIMENTAL | +| kube_configmap_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `configmap`=<configmap-name>
`namespace`=<configmap-namespace>
`label_CONFIGMAP_LABEL`=<CONFIGMAP_LABEL> | STABLE | | kube_configmap_info | Gauge | | `configmap`=<configmap-name>
`namespace`=<configmap-namespace> | STABLE | | kube_configmap_created | Gauge | | `configmap`=<configmap-name>
`namespace`=<configmap-namespace> | STABLE | | kube_configmap_metadata_resource_version | Gauge | | `configmap`=<configmap-name>
`namespace`=<configmap-namespace> | EXPERIMENTAL | diff --git a/docs/persistentvolume-metrics.md b/docs/metrics/storage/persistentvolume-metrics.md similarity index 93% rename from docs/persistentvolume-metrics.md rename to docs/metrics/storage/persistentvolume-metrics.md index ec8917b837..d4cdd569cf 100644 --- a/docs/persistentvolume-metrics.md +++ b/docs/metrics/storage/persistentvolume-metrics.md @@ -2,15 +2,15 @@ | Metric name | Metric type | Description | Unit (where applicable) | Labels/tags | Status | |------------------------------------------|-------------|---------------------------------------------------------------------------------------------------------------------------|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| -| kube_persistentvolume_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | | `persistentvolume`=<persistentvolume-name>
`annotation_PERSISTENTVOLUME_ANNOTATION`=<PERSISTENTVOLUME_ANNOTATION> | EXPERIMENTAL | +| kube_persistentvolume_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | | `persistentvolume`=<persistentvolume-name>
`annotation_PERSISTENTVOLUME_ANNOTATION`=<PERSISTENTVOLUME_ANNOTATION> | EXPERIMENTAL | | kube_persistentvolume_capacity_bytes | Gauge | | | `persistentvolume`=<pv-name> | STABLE | | kube_persistentvolume_status_phase | Gauge | | | `persistentvolume`=<pv-name>
`phase`=<Bound\|Failed\|Pending\|Available\|Released> | STABLE | | kube_persistentvolume_claim_ref | Gauge | | | `persistentvolume`=<pv-name>
`claim_namespace`=<>
`name`=<> | STABLE | -| kube_persistentvolume_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | | `persistentvolume`=<persistentvolume-name>
`label_PERSISTENTVOLUME_LABEL`=<PERSISTENTVOLUME_LABEL> | STABLE | +| kube_persistentvolume_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | | `persistentvolume`=<persistentvolume-name>
`label_PERSISTENTVOLUME_LABEL`=<PERSISTENTVOLUME_LABEL> | STABLE | | kube_persistentvolume_info | Gauge | Information about Persistent Volumes | | `persistentvolume`=<pv-name>
`storageclass`=<storageclass-name>
`gce_persistent_disk_name`=<pd-name>
`host_path`=<path-of-a-host-volume>
`host_path_type`=<host-mount-type>
`ebs_volume_id`=<ebs-volume-id>
`azure_disk_name`=<azure-disk-name>
`fc_wwids`=<fc-wwids-comma-separated>
`fc_lun`=<fc-lun>
`fc_target_wwns`=<fc-target-wwns-comma-separated>
`iscsi_target_portal`=<iscsi-target-portal>
`iscsi_iqn`=<iscsi-iqn>
`iscsi_lun`=<iscsi-lun>
`iscsi_initiator_name`=<iscsi-initiator-name>
`local_path`=<path-of-a-local-volume>
`local_fs`=<local-volume-fs-type>
`nfs_server`=<nfs-server>
`nfs_path`=<nfs-path>
`csi_driver`=<csi-driver>
`csi_volume_handle`=<csi-volume-handle> | STABLE | | kube_persistentvolume_created | Gauge | Unix creation timestamp | seconds | `persistentvolume`=<persistentvolume-name>
| EXPERIMENTAL | | kube_persistentvolume_deletion_timestamp | Gauge | Unix deletion timestamp | seconds | `persistentvolume`=<persistentvolume-name>
| EXPERIMENTAL | -| kube_persistentvolume_csi_attributes | Gauge | CSI attributes of the Persistent Volume, disabled by default, manage with [--metric-opt-in-list](./cli-arguments.md)) | | `persistentvolume`=<persistentvolume-name>
`csi_mounter`=<csi-mounter>
`csi_map_options`=<csi-map-options> | EXPERIMENTAL | +| kube_persistentvolume_csi_attributes | Gauge | CSI attributes of the Persistent Volume, disabled by default, manage with [--metric-opt-in-list](../../developer/cli-arguments.md)) | | `persistentvolume`=<persistentvolume-name>
`csi_mounter`=<csi-mounter>
`csi_map_options`=<csi-map-options> | EXPERIMENTAL | ## Useful metrics queries diff --git a/docs/persistentvolumeclaim-metrics.md b/docs/metrics/storage/persistentvolumeclaim-metrics.md similarity index 88% rename from docs/persistentvolumeclaim-metrics.md rename to docs/metrics/storage/persistentvolumeclaim-metrics.md index 33e76d262e..ecd075e46e 100644 --- a/docs/persistentvolumeclaim-metrics.md +++ b/docs/metrics/storage/persistentvolumeclaim-metrics.md @@ -2,10 +2,10 @@ | Metric name | Metric type | Description | Unit (where applicable) | Labels/tags | Status | | ---------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | -| kube_persistentvolumeclaim_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | | `persistentvolumeclaim`=<persistentvolumeclaim-name>
`namespace`=<persistentvolumeclaim-namespace>
`annotation_PERSISTENTVOLUMECLAIM_ANNOTATION`=<PERSISTENTVOLUMECLAIM_ANNOATION> | EXPERIMENTAL | +| kube_persistentvolumeclaim_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | | `persistentvolumeclaim`=<persistentvolumeclaim-name>
`namespace`=<persistentvolumeclaim-namespace>
`annotation_PERSISTENTVOLUMECLAIM_ANNOTATION`=<PERSISTENTVOLUMECLAIM_ANNOATION> | EXPERIMENTAL | | kube_persistentvolumeclaim_access_mode | Gauge | | | `access_mode`=<persistentvolumeclaim-access-mode>
`namespace`=<persistentvolumeclaim-namespace>
`persistentvolumeclaim`=<persistentvolumeclaim-name> | STABLE | | kube_persistentvolumeclaim_info | Gauge | | | `namespace`=<persistentvolumeclaim-namespace>
`persistentvolumeclaim`=<persistentvolumeclaim-name>
`storageclass`=<persistentvolumeclaim-storageclassname>
`volumename`=<volumename>
`volumemode`=<volumemode> | STABLE | -| kube_persistentvolumeclaim_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | | `persistentvolumeclaim`=<persistentvolumeclaim-name>
`namespace`=<persistentvolumeclaim-namespace>
`label_PERSISTENTVOLUMECLAIM_LABEL`=<PERSISTENTVOLUMECLAIM_LABEL> | STABLE | +| kube_persistentvolumeclaim_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | | `persistentvolumeclaim`=<persistentvolumeclaim-name>
`namespace`=<persistentvolumeclaim-namespace>
`label_PERSISTENTVOLUMECLAIM_LABEL`=<PERSISTENTVOLUMECLAIM_LABEL> | STABLE | | kube_persistentvolumeclaim_resource_requests_storage_bytes | Gauge | | | `namespace`=<persistentvolumeclaim-namespace>
`persistentvolumeclaim`=<persistentvolumeclaim-name> | STABLE | | kube_persistentvolumeclaim_status_condition | Gauge | | | `namespace` =<persistentvolumeclaim-namespace>
`persistentvolumeclaim`=<persistentvolumeclaim-name>
`type`=<persistentvolumeclaim-condition-type>
`status`=<true\false\unknown> | EXPERIMENTAL | | kube_persistentvolumeclaim_status_phase | Gauge | | | `namespace`=<persistentvolumeclaim-namespace>
`persistentvolumeclaim`=<persistentvolumeclaim-name>
`phase`=<Pending\Bound\Lost> | STABLE | diff --git a/docs/secret-metrics.md b/docs/metrics/storage/secret-metrics.md similarity index 86% rename from docs/secret-metrics.md rename to docs/metrics/storage/secret-metrics.md index ac0d6904ac..1cc579e25d 100644 --- a/docs/secret-metrics.md +++ b/docs/metrics/storage/secret-metrics.md @@ -2,10 +2,10 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_secret_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `secret`=<secret-name>
`namespace`=<secret-namespace>
`annotations_SECRET_ANNOTATION`=<SECRET_ANNOTATION> | EXPERIMENTAL | +| kube_secret_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `secret`=<secret-name>
`namespace`=<secret-namespace>
`annotations_SECRET_ANNOTATION`=<SECRET_ANNOTATION> | EXPERIMENTAL | | kube_secret_info | Gauge | | `secret`=<secret-name>
`namespace`=<secret-namespace> | STABLE | | kube_secret_type | Gauge | | `secret`=<secret-name>
`namespace`=<secret-namespace>
`type`=<secret-type> | STABLE | -| kube_secret_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `secret`=<secret-name>
`namespace`=<secret-namespace>
`label_SECRET_LABEL`=<SECRET_LABEL> | STABLE | +| kube_secret_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `secret`=<secret-name>
`namespace`=<secret-namespace>
`label_SECRET_LABEL`=<SECRET_LABEL> | STABLE | | kube_secret_created | Gauge | | `secret`=<secret-name>
`namespace`=<secret-namespace> | STABLE | | kube_secret_metadata_resource_version | Gauge | | `secret`=<secret-name>
`namespace`=<secret-namespace> | EXPERIMENTAL | | kube_secret_owner | Gauge | | `secret`=<secret-name>
`namespace`=<secret-namespace>
`owner_kind`=<owner kind>
`owner_name`=<owner name>
`owner_is_controller`=<whether owner is controller> | EXPERIMENTAL | diff --git a/docs/storageclass-metrics.md b/docs/metrics/storage/storageclass-metrics.md similarity index 81% rename from docs/storageclass-metrics.md rename to docs/metrics/storage/storageclass-metrics.md index f0ab1a85be..e1e3dd5441 100644 --- a/docs/storageclass-metrics.md +++ b/docs/metrics/storage/storageclass-metrics.md @@ -2,7 +2,7 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ----------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_storageclass_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `storageclass`=<storageclass-name>
`annotation_STORAGECLASS_ANNOTATION`=<STORAGECLASS_ANNOTATION> | EXPERIMENTAL | +| kube_storageclass_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `storageclass`=<storageclass-name>
`annotation_STORAGECLASS_ANNOTATION`=<STORAGECLASS_ANNOTATION> | EXPERIMENTAL | | kube_storageclass_info | Gauge | | `storageclass`=<storageclass-name>
`provisioner`=<storageclass-provisioner>
`reclaim_policy`=<storageclass-reclaimPolicy>
`volume_binding_mode`=<storageclass-volumeBindingMode> | STABLE | -| kube_storageclass_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `storageclass`=<storageclass-name>
`label_STORAGECLASS_LABEL`=<STORAGECLASS_LABEL> | STABLE | +| kube_storageclass_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `storageclass`=<storageclass-name>
`label_STORAGECLASS_LABEL`=<STORAGECLASS_LABEL> | STABLE | | kube_storageclass_created | Gauge | | `storageclass`=<storageclass-name> | STABLE | diff --git a/docs/volumeattachment-metrics.md b/docs/metrics/storage/volumeattachment-metrics.md similarity index 92% rename from docs/volumeattachment-metrics.md rename to docs/metrics/storage/volumeattachment-metrics.md index 994172ebde..b56be11a1f 100644 --- a/docs/volumeattachment-metrics.md +++ b/docs/metrics/storage/volumeattachment-metrics.md @@ -4,7 +4,7 @@ | -------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------ | | kube_volumeattachment_info | Gauge | | `volumeattachment`=<volumeattachment-name>
`attacher`=<attacher-name>
`node`=<node-name> | EXPERIMENTAL | | kube_volumeattachment_created | Gauge | | `volumeattachment`=<volumeattachment-name> | EXPERIMENTAL | -| kube_volumeattachment_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `volumeattachment`=<volumeattachment-name>
`label_VOLUMEATTACHMENT_LABEL`=<VOLUMEATTACHMENT_LABEL> | EXPERIMENTAL | +| kube_volumeattachment_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `volumeattachment`=<volumeattachment-name>
`label_VOLUMEATTACHMENT_LABEL`=<VOLUMEATTACHMENT_LABEL> | EXPERIMENTAL | | kube_volumeattachment_spec_source_persistentvolume | Gauge | | `volumeattachment`=<volumeattachment-name>
`volumename`=<persistentvolume-name> | EXPERIMENTAL | | kube_volumeattachment_status_attached | Gauge | | `volumeattachment`=<volumeattachment-name> | EXPERIMENTAL | | kube_volumeattachment_status_attachment_metadata | Gauge | | `volumeattachment`=<volumeattachment-name>
`metadata_METADATA_KEY`=<METADATA_VALUE> | EXPERIMENTAL | diff --git a/docs/cronjob-metrics.md b/docs/metrics/workload/cronjob-metrics.md similarity index 90% rename from docs/cronjob-metrics.md rename to docs/metrics/workload/cronjob-metrics.md index c6fb25e950..ae32dc65d8 100644 --- a/docs/cronjob-metrics.md +++ b/docs/metrics/workload/cronjob-metrics.md @@ -2,9 +2,9 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ---------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_cronjob_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace>
`annotation_CRONJOB_ANNOTATION`=<CRONJOB_ANNOTATION> | EXPERIMENTAL | +| kube_cronjob_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace>
`annotation_CRONJOB_ANNOTATION`=<CRONJOB_ANNOTATION> | EXPERIMENTAL | | kube_cronjob_info | Gauge | | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace>
`schedule`=<schedule>
`concurrency_policy`=<concurrency-policy> | STABLE | -| kube_cronjob_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace>
`label_CRONJOB_LABEL`=<CRONJOB_LABEL> | STABLE | +| kube_cronjob_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace>
`label_CRONJOB_LABEL`=<CRONJOB_LABEL> | STABLE | | kube_cronjob_created | Gauge | | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace> | STABLE | | kube_cronjob_next_schedule_time | Gauge | | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace> | STABLE | | kube_cronjob_status_active | Gauge | | `cronjob`=<cronjob-name>
`namespace`=<cronjob-namespace> | STABLE | diff --git a/docs/daemonset-metrics.md b/docs/metrics/workload/daemonset-metrics.md similarity index 90% rename from docs/daemonset-metrics.md rename to docs/metrics/workload/daemonset-metrics.md index 071b3f62fe..04c5edf4e0 100644 --- a/docs/daemonset-metrics.md +++ b/docs/metrics/workload/daemonset-metrics.md @@ -2,7 +2,7 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ---------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_daemonset_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace>
`annotation_DAEMONSET_ANNOTATION`=<DAEMONSET_ANNOTATION> | EXPERIMENTAL | +| kube_daemonset_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace>
`annotation_DAEMONSET_ANNOTATION`=<DAEMONSET_ANNOTATION> | EXPERIMENTAL | | kube_daemonset_created | Gauge | | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace> | STABLE | | kube_daemonset_status_current_number_scheduled | Gauge | | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace> | STABLE | | kube_daemonset_status_desired_number_scheduled | Gauge | | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace> | STABLE | @@ -13,4 +13,4 @@ | kube_daemonset_status_observed_generation | Gauge | | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace> | STABLE | | kube_daemonset_status_updated_number_scheduled | Gauge | | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace> | STABLE | | kube_daemonset_metadata_generation | Gauge | | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace> | STABLE | -| kube_daemonset_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace>
`label_DAEMONSET_LABEL`=<DAEMONSET_LABEL> | STABLE | +| kube_daemonset_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `daemonset`=<daemonset-name>
`namespace`=<daemonset-namespace>
`label_DAEMONSET_LABEL`=<DAEMONSET_LABEL> | STABLE | diff --git a/docs/deployment-metrics.md b/docs/metrics/workload/deployment-metrics.md similarity index 91% rename from docs/deployment-metrics.md rename to docs/metrics/workload/deployment-metrics.md index d12e0c37cd..94f5159015 100644 --- a/docs/deployment-metrics.md +++ b/docs/metrics/workload/deployment-metrics.md @@ -2,7 +2,7 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ----------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_deployment_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `deployment`=<deployment-name>
`namespace`=<deployment-namespace>
`annotation_DEPLOYMENT_ANNOTATION`=<DEPLOYMENT_ANNOTATION> | EXPERIMENTAL | +| kube_deployment_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `deployment`=<deployment-name>
`namespace`=<deployment-namespace>
`annotation_DEPLOYMENT_ANNOTATION`=<DEPLOYMENT_ANNOTATION> | EXPERIMENTAL | | kube_deployment_status_replicas | Gauge | | `deployment`=<deployment-name>
`namespace`=<deployment-namespace> | STABLE | | kube_deployment_status_replicas_ready | Gauge | | `deployment`=<deployment-name>
`namespace`=<deployment-namespace> | STABLE | | kube_deployment_status_replicas_available | Gauge | | `deployment`=<deployment-name>
`namespace`=<deployment-namespace> | STABLE | @@ -15,5 +15,5 @@ | kube_deployment_spec_strategy_rollingupdate_max_unavailable | Gauge | | `deployment`=<deployment-name>
`namespace`=<deployment-namespace> | STABLE | | kube_deployment_spec_strategy_rollingupdate_max_surge | Gauge | | `deployment`=<deployment-name>
`namespace`=<deployment-namespace> | STABLE | | kube_deployment_metadata_generation | Gauge | | `deployment`=<deployment-name>
`namespace`=<deployment-namespace> | STABLE | -| kube_deployment_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `deployment`=<deployment-name>
`namespace`=<deployment-namespace>
`label_DEPLOYMENT_LABEL`=<DEPLOYMENT_LABEL> | STABLE | +| kube_deployment_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `deployment`=<deployment-name>
`namespace`=<deployment-namespace>
`label_DEPLOYMENT_LABEL`=<DEPLOYMENT_LABEL> | STABLE | | kube_deployment_created | Gauge | | `deployment`=<deployment-name>
`namespace`=<deployment-namespace> | STABLE | diff --git a/docs/horizontalpodautoscaler-metrics.md b/docs/metrics/workload/horizontalpodautoscaler-metrics.md similarity index 90% rename from docs/horizontalpodautoscaler-metrics.md rename to docs/metrics/workload/horizontalpodautoscaler-metrics.md index 2639044d43..383bdca13f 100644 --- a/docs/horizontalpodautoscaler-metrics.md +++ b/docs/metrics/workload/horizontalpodautoscaler-metrics.md @@ -3,8 +3,8 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ---------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | | kube_horizontalpodautoscaler_info | Gauge | | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace>
`scaletargetref_api_version`=<hpa-target-api-version>
`scaletargetref_kind`=<hpa-target-kind>
`scaletargetref_name`=<hpa-target-name> | EXPERIMENTAL | -| kube_horizontalpodautoscaler_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace> | EXPERIMENTAL | -| kube_horizontalpodautoscaler_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace> | STABLE | +| kube_horizontalpodautoscaler_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace> | EXPERIMENTAL | +| kube_horizontalpodautoscaler_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace> | STABLE | | kube_horizontalpodautoscaler_metadata_generation | Gauge | | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace> | STABLE | | kube_horizontalpodautoscaler_spec_max_replicas | Gauge | | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace> | STABLE | | kube_horizontalpodautoscaler_spec_min_replicas | Gauge | | `horizontalpodautoscaler`=<hpa-name>
`namespace`=<hpa-namespace> | STABLE | diff --git a/docs/job-metrics.md b/docs/metrics/workload/job-metrics.md similarity index 93% rename from docs/job-metrics.md rename to docs/metrics/workload/job-metrics.md index cb174e0a8c..d5959c4dd7 100644 --- a/docs/job-metrics.md +++ b/docs/metrics/workload/job-metrics.md @@ -2,9 +2,9 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_job_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `job_name`=<job-name>
`namespace`=<job-namespace>
`annotation_JOB_ANNOTATION`=<JOB_ANNOTATION> | EXPERIMENTAL | +| kube_job_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `job_name`=<job-name>
`namespace`=<job-namespace>
`annotation_JOB_ANNOTATION`=<JOB_ANNOTATION> | EXPERIMENTAL | | kube_job_info | Gauge | | `job_name`=<job-name>
`namespace`=<job-namespace> | STABLE | -| kube_job_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `job_name`=<job-name>
`namespace`=<job-namespace>
`label_JOB_LABEL`=<JOB_LABEL> | STABLE | +| kube_job_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `job_name`=<job-name>
`namespace`=<job-namespace>
`label_JOB_LABEL`=<JOB_LABEL> | STABLE | | kube_job_owner | Gauge | | `job_name`=<job-name>
`namespace`=<job-namespace>
`owner_kind`=<owner kind>
`owner_name`=<owner name>
`owner_is_controller`=<whether owner is controller> | STABLE | | kube_job_spec_parallelism | Gauge | | `job_name`=<job-name>
`namespace`=<job-namespace> | STABLE | | kube_job_spec_completions | Gauge | | `job_name`=<job-name>
`namespace`=<job-namespace> | STABLE | diff --git a/docs/pod-metrics.md b/docs/metrics/workload/pod-metrics.md similarity index 97% rename from docs/pod-metrics.md rename to docs/metrics/workload/pod-metrics.md index 995c220ceb..d4fc5ccab3 100644 --- a/docs/pod-metrics.md +++ b/docs/metrics/workload/pod-metrics.md @@ -2,13 +2,13 @@ | Metric name | Metric type | Description | Unit (where applicable) | Labels/tags | Status | Opt-in | | ----------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------ | -| kube_pod_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`annotation_POD_ANNOTATION`=<POD_ANNOTATION>
`uid`=<pod-uid> | EXPERIMENTAL | - | +| kube_pod_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`annotation_POD_ANNOTATION`=<POD_ANNOTATION>
`uid`=<pod-uid> | EXPERIMENTAL | - | | kube_pod_info | Gauge | Information about pod | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`host_ip`=<host-ip>
`pod_ip`=<pod-ip>
`node`=<node-name>
`created_by_kind`=<created_by_kind>
`created_by_name`=<created_by_name>
`uid`=<pod-uid>
`priority_class`=<priority_class>
`host_network`=<host_network> | STABLE | - | | kube_pod_ips | Gauge | Pod IP addresses | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`ip`=<pod-ip-address>
`ip_family`=<4 OR 6>
`uid`=<pod-uid> | EXPERIMENTAL | - | | kube_pod_start_time | Gauge | Start time in unix timestamp for a pod | seconds | `pod`=<pod-name>
`namespace`=<pod-namespace>
`uid`=<pod-uid> | STABLE | - | | kube_pod_completion_time | Gauge | Completion time in unix timestamp for a pod | seconds | `pod`=<pod-name>
`namespace`=<pod-namespace>
`uid`=<pod-uid> | STABLE | - | | kube_pod_owner | Gauge | Information about the Pod's owner | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`owner_kind`=<owner kind>
`owner_name`=<owner name>
`owner_is_controller`=<whether owner is controller>
`uid`=<pod-uid> | STABLE | - | -| kube_pod_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`label_POD_LABEL`=<POD_LABEL>
`uid`=<pod-uid> | STABLE | - | +| kube_pod_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`label_POD_LABEL`=<POD_LABEL>
`uid`=<pod-uid> | STABLE | - | | kube_pod_nodeselectors | Gauge | Describes the Pod nodeSelectors | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`nodeselector_NODE_SELECTOR`=<NODE_SELECTOR>
`uid`=<pod-uid> | EXPERIMENTAL | Opt-in | | kube_pod_status_phase | Gauge | The pods current phase | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`phase`=<Pending\|Running\|Succeeded\|Failed\|Unknown>
`uid`=<pod-uid> | STABLE | - | | kube_pod_status_qos_class | Gauge | The pods current qosClass | | `pod`=<pod-name>
`namespace`=<pod-namespace>
`qos_class`=<BestEffort\|Burstable\|Guaranteed>
`uid`=<pod-uid> | EXPERIMENTAL | - | diff --git a/docs/replicaset-metrics.md b/docs/metrics/workload/replicaset-metrics.md similarity index 87% rename from docs/replicaset-metrics.md rename to docs/metrics/workload/replicaset-metrics.md index 5d3991ba3c..cf3f8e6e10 100644 --- a/docs/replicaset-metrics.md +++ b/docs/metrics/workload/replicaset-metrics.md @@ -2,13 +2,13 @@ | Metric name | Metric type | Description | Labels/tags | Status | | --------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_replicaset_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace>
`annotation_REPLICASET_ANNOTATION`=<REPLICASET_ANNOTATION> | EXPERIMENTAL | +| kube_replicaset_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace>
`annotation_REPLICASET_ANNOTATION`=<REPLICASET_ANNOTATION> | EXPERIMENTAL | | kube_replicaset_status_replicas | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace> | STABLE | | kube_replicaset_status_fully_labeled_replicas | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace> | STABLE | | kube_replicaset_status_ready_replicas | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace> | STABLE | | kube_replicaset_status_observed_generation | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace> | STABLE | | kube_replicaset_spec_replicas | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace> | STABLE | | kube_replicaset_metadata_generation | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace> | STABLE | -| kube_replicaset_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace>
`label_REPLICASET_LABEL`=<REPLICASET_LABEL> | STABLE | +| kube_replicaset_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace>
`label_REPLICASET_LABEL`=<REPLICASET_LABEL> | STABLE | | kube_replicaset_created | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace> | STABLE | | kube_replicaset_owner | Gauge | | `replicaset`=<replicaset-name>
`namespace`=<replicaset-namespace>
`owner_kind`=<owner kind>
`owner_name`=<owner name>
`owner_is_controller`=<whether owner is controller> | STABLE | diff --git a/docs/replicationcontroller-metrics.md b/docs/metrics/workload/replicationcontroller-metrics.md similarity index 100% rename from docs/replicationcontroller-metrics.md rename to docs/metrics/workload/replicationcontroller-metrics.md diff --git a/docs/statefulset-metrics.md b/docs/metrics/workload/statefulset-metrics.md similarity index 91% rename from docs/statefulset-metrics.md rename to docs/metrics/workload/statefulset-metrics.md index 51cb984e13..b3a47fd125 100644 --- a/docs/statefulset-metrics.md +++ b/docs/metrics/workload/statefulset-metrics.md @@ -2,7 +2,7 @@ | Metric name | Metric type | Description | Labels/tags | Status | | ------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| kube_statefulset_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](./cli-arguments.md) | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace>
`annotation_STATEFULSET_ANNOTATION`=<STATEFULSET_ANNOTATION> | EXPERIMENTAL | +| kube_statefulset_annotations | Gauge | Kubernetes annotations converted to Prometheus labels controlled via [--metric-annotations-allowlist](../../developer/cli-arguments.md) | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace>
`annotation_STATEFULSET_ANNOTATION`=<STATEFULSET_ANNOTATION> | EXPERIMENTAL | | kube_statefulset_status_replicas | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace> | STABLE | | kube_statefulset_status_replicas_current | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace> | STABLE | | kube_statefulset_status_replicas_ready | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace> | STABLE | @@ -14,6 +14,6 @@ | kube_statefulset_metadata_generation | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace> | STABLE | | kube_statefulset_persistentvolumeclaim_retention_policy | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace>
`when_deleted`=<statefulset-when-deleted-pvc-policy>
`when_scaled`=<statefulset-when-scaled-pvc-policy> | EXPERIMENTAL | | kube_statefulset_created | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace> | STABLE | -| kube_statefulset_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](./cli-arguments.md) | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace>
`label_STATEFULSET_LABEL`=<STATEFULSET_LABEL> | STABLE | +| kube_statefulset_labels | Gauge | Kubernetes labels converted to Prometheus labels controlled via [--metric-labels-allowlist](../../developer/cli-arguments.md) | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace>
`label_STATEFULSET_LABEL`=<STATEFULSET_LABEL> | STABLE | | kube_statefulset_status_current_revision | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace>
`revision`=<statefulset-current-revision> | STABLE | | kube_statefulset_status_update_revision | Gauge | | `statefulset`=<statefulset-name>
`namespace`=<statefulset-namespace>
`revision`=<statefulset-update-revision> | STABLE | diff --git a/tests/e2e/main_test.go b/tests/e2e/main_test.go index 9860a14c6d..2daae7e222 100644 --- a/tests/e2e/main_test.go +++ b/tests/e2e/main_test.go @@ -21,9 +21,9 @@ import ( "bytes" "flag" "fmt" + "io/fs" "log" "os" - "path" "path/filepath" "regexp" "sort" @@ -145,12 +145,6 @@ func TestDocumentation(t *testing.T) { func getLabelsDocumentation() (map[string][]string, error) { documentedMetrics := map[string][]string{} - docPath := "../../docs/" - docFiles, err := os.ReadDir(docPath) - if err != nil { - return nil, fmt.Errorf("failed to read documentation directory: %w", err) - } - // Match file names such as daemonset-metrics.md fileRe := regexp.MustCompile(`^([a-z]*)-metrics.md$`) // Match doc lines such as | kube_node_created | Gauge | `node`=<node-address>| STABLE | @@ -160,15 +154,16 @@ func getLabelsDocumentation() (map[string][]string, error) { // Match wildcard patterns for dynamic labels such as label_CRONJOB_LABEL patternRe := regexp.MustCompile(`_[A-Z_]+`) - for _, file := range docFiles { - if file.IsDir() || !fileRe.MatchString(file.Name()) { - continue + err := filepath.WalkDir("../../docs", func(p string, d fs.DirEntry, err error) error { + + if d.IsDir() || !fileRe.MatchString(d.Name()) { + // Ignore the entry + return nil } - filePath := path.Join(docPath, file.Name()) - f, err := os.Open(filepath.Clean(filePath)) - if err != nil { - return nil, fmt.Errorf("cannot read file %s: %w", filePath, err) + f, e := os.Open(filepath.Clean(p)) + if e != nil { + return fmt.Errorf("cannot read file %s: %w", p, e) } scanner := bufio.NewScanner(f) for scanner.Scan() { @@ -183,14 +178,19 @@ func getLabelsDocumentation() (map[string][]string, error) { labelPatterns := make([]string, len(labels)) for i, l := range labels { if len(l) <= 1 { - return nil, fmt.Errorf("Label documentation %s did not match regex", labelsDoc) + return fmt.Errorf("label documentation %s did not match regex", labelsDoc) } labelPatterns[i] = patternRe.ReplaceAllString(l[1], "_.*") } documentedMetrics[metric] = labelPatterns } + return nil + }) + if err != nil { + log.Fatalf("cannot walk the documentation directory: %w", err) } + return documentedMetrics, nil }