<commit_before># Metrics

Kubernetes-Vault uses [Prometheus](https://www.prometheus.io) for metrics reporting. These metrcis can be used for
monitoring and debugging. Metrics are not persisted, if a node restarts, the metrics for that node will reset.

Too see the metrics, visit the `/metrics` endpoint.

## Configuration
Metrics can be served over http by default. To enable https, set the `VAULT_CA_BACKEND` and `VAULT_CA_ROLE` environment
variable. `VAULT_CA_BACKEND` is the PKI mount in Vault that we want to used. `VAULT_CA_ROLE` is the role for the PKI mount
that we want to use to issue TLS certificates.

If you need TLS Client Authentication (to ensure only authorized clients can connect to the metrics endpoint), set the
`VAULT_CLIENT_CAS` environment variable to a comma-separated list of Vault PKI mounts that will serve as your Root CAs.

## Collected metrics

### Kubernetes
These metrics are prefixed with `kubernetesvault_kubernetes_`.

| Name                   | Description                                                                 | Type  |
|------------------------|-----------------------------------------------------------------------------|-------|<commit_msg>Fix typo in metrics documentation.<commit_after># Metrics

Kubernetes-Vault uses [Prometheus](https://www.prometheus.io) for metrics reporting. These metrcis can be used for
monitoring and debugging. Metrics are not persisted, if a node restarts, the metrics for that node will reset.

To see the metrics, visit the `/metrics` endpoint.

## Configuration
Metrics can be served over http by default. To enable https, set the `VAULT_CA_BACKEND` and `VAULT_CA_ROLE` environment
variable. `VAULT_CA_BACKEND` is the PKI mount in Vault that we want to used. `VAULT_CA_ROLE` is the role for the PKI mount
that we want to use to issue TLS certificates.

If you need TLS Client Authentication (to ensure only authorized clients can connect to the metrics endpoint), set the
`VAULT_CLIENT_CAS` environment variable to a comma-separated list of Vault PKI mounts that will serve as your Root CAs.

## Collected metrics

### Kubernetes
These metrics are prefixed with `kubernetesvault_kubernetes_`.

| Name                   | Description                                                                 | Type  |
|------------------------|-----------------------------------------------------------------------------|-------|
{'fraction_non_alphanumeric': 0.141846921797005, 'fraction_numerical': 0.0, 'mean_word_length': 2.3218232044198897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2422483', 'n_tokens_mistral': 594, 'n_tokens_neox': 560, 'n_words': 278}