Supported telemetry types
The Vault integration supports these telemetry types:Prerequisites
The Vault integration has the following prerequisites:-
Enable the Vault Prometheus telemetry endpoint. Make sure that
prometheus_retention_timeis greater than0: -
Make the Vault API root, such as
https://vault.example.com:8200/v1, reachable from the CXDOT Collector. -
Choose one authentication method for
/v1/sys/metrics:-
Create a Vault token in the root namespace with
readandlistaccess tosys/metrics. Supply the token directly or through a Collector-local file. -
Enable unauthenticated metrics access in the Vault TCP listener:
Configure the target with
no_token: true. Unauthenticated metrics access is also required to collect each standby node’s own metrics.
-
Create a Vault token in the root namespace with
Configure
The Vault integration is enabled by default. You can configure targets either by annotating pods and Services in your Kubernetes cluster or by listing static endpoints in your Helm values. To configure the Vault integration, follow these steps:-
To collect from Vault server pods in Kubernetes, add a CXDOT integration annotation
to the pod template. The annotation key must end with the container name, and its
value can reference a Vault token stored in a Kubernetes Secret in the same
namespace. For example, add the following annotation to your Vault StatefulSet:
The Collector replaces
${target.host}with the pod IP address,${target.port.http}with the container port namedhttp, and${k8s_secret:vault-metrics/token}with thetokenkey of thevault-metricsSecret. To allow the Collector to read the Secret, add the pod’s namespace toapiServer.metadataServer.secretAllowlistin the Helm values for your CXDOT Collector. -
Optional: To collect from Vault servers outside your Kubernetes cluster, configure
static instances. For example, add the following to the Helm values file for your
CXDOT Collector:
When you configure static instances, this integration instance collects from exactly those targets instead of discovered targets. In cluster mode, the cluster Collector that wins leader election scrapes static instances.
-
Optional: Configure a second integration instance to collect from both
annotated targets and static instances. For example, add the following to the
Helm values file for your CXDOT Collector:
The
vault/externalkey defines a named instance for the static targets. The barevaultkey continues to discover annotated pods and Services. -
Optional: Disable the integration. For example, add the following to the Helm
values file for your CXDOT Collector:
Validate
To validate the Vault integration, follow these steps:-
In Live Telemetry Analyzer,
filter for
__name__=cxdot.integration.target.healthandcxdot.integration.name=vault. Confirm thatcxdot.integration.target.healthreports1for each reachable target. A value of1means that the Vault API health and leadership requests succeeded. A value of0means that they failed. Thecxdot.integration.target,server.address, andserver.portattributes identify each target. -
In Metrics Explorer,
run the following query while Vault handles requests:
Confirm that the query returns the expected time series for each target. The
vault.cluster,vault.version, andvault.is_leaderattributes identify the Vault cluster, version, and leadership state.
Troubleshooting
cxdot.integration.target.healthreports1, but workload metrics don’t appear: Confirm that the token hasreadandlistaccess tosys/metrics, or that the target enables unauthenticated metrics access and usesno_token: true.- A disaster recovery secondary reports API status metrics but no workload metrics:
Set
collect_secondary_dr: truefor that target. The integration omits workload metrics from disaster recovery secondaries by default.
Configuration reference
Configure one Vault integration instance with the following settings. In Helm values, place these settings undercollection.cxdot.integrations.vault. In a Collector configuration file,
place them under cxdot.integrations.vault.
Optional settings
-
enabledType:boolean. Optional. Default:true. Whether to enable this Vault integration instance. If true, the Collector collects metrics from configured or discovered targets. If false, the Collector doesn’t run this integration instance. -
collection_intervalType:duration. Optional. Default:15s. How often the Collector collects metrics from each Vault target. -
timeoutType:duration. Optional. Default:10s. Maximum time the Collector waits for a Vault target to respond during one collection. This value must not exceedcollection_interval. If the deadline expires, that collection fails. -
max_samplesType:integer. Optional. Default:0. Minimum:0. Maximum samples accepted from one metrics response. Zero disables the sample-count limit. Decompressed responses larger than 16 MiB are always rejected. -
follow_redirectsType:boolean. Optional. Default:true. Whether to follow HTTP redirects. If true, the Collector follows redirects. If false, a redirect causes the metric collection to fail. -
instancesType:array of object. Optional. Default:[]. Vault API targets. When this list isn’t empty, the integration collects from exactly these targets instead of discovered targets. -
instances[].endpointType:uri. Required. Base Vault API URL ending in /v1. -
instances[].client_tokenType:string. Optional. Token with read and list access to the metrics endpoint. -
instances[].client_token_pathType:string. Optional. Collector-local path containing a Vault token. -
instances[].no_tokenType:boolean. Optional. Default:false. Scrape metrics without a token when unauthenticated access is enabled. -
instances[].collect_secondary_drType:boolean. Optional. Default:false. Collect metrics when the target reports that it’s a disaster-recovery secondary. -
instances[].tlsType:object. Optional. TLS settings for this target. -
instances[].tls.ca_fileType:string. Optional. Path to a PEM-encoded certificate authority (CA) certificate file used to verify the Vault server certificate. If omitted, the Collector uses the system certificate authority pool. -
instances[].tls.ca_pemType:string. Optional. PEM-encoded certificate authority certificate content used to verify the Vault server certificate. -
instances[].tls.cert_fileType:string. Optional. Path to the PEM-encoded client certificate file to present when the Vault target requires mutual TLS authentication. -
instances[].tls.cert_pemType:string. Optional. PEM-encoded client certificate content to present when the Vault target requires mutual TLS authentication. -
instances[].tls.cipher_suitesType:array of string. Optional. TLS cipher suites that the Collector can use, in preference order. If omitted, the Collector uses the secure defaults from the Go TLS library. For supported names, see https://go.dev/src/crypto/tls/cipher_suites.go. -
instances[].tls.curve_preferencesType:array of string. Optional. Elliptic curves that the Collector can use for an elliptic curve Diffie-Hellman ephemeral handshake, in preference order. If omitted, the Collector uses the Go TLS library defaults. -
instances[].tls.include_system_ca_certs_poolType:boolean. Optional. Whether to add certificates from the system certificate authority pool to the configured certificate authorities. If true, the Collector trusts both sources. If false, the Collector trusts only the configured certificate authorities. -
instances[].tls.insecureType:boolean. Optional. Whether to disable transport security. If true, the Collector uses an unencrypted connection. If false, the Collector uses TLS. -
instances[].tls.insecure_skip_verifyType:boolean. Optional. Whether to skip verification of the Vault server certificate. If true, the connection is encrypted but isn’t authenticated and is vulnerable to man-in-the-middle attacks. If false, the Collector verifies the certificate. -
instances[].tls.key_fileType:string. Optional. Path to the PEM-encoded client private key file used withcert_filefor mutual TLS authentication. -
instances[].tls.key_pemType:string. Optional. PEM-encoded client private key content used withcert_pemfor mutual TLS authentication. -
instances[].tls.max_versionType:string. Optional. Maximum TLS protocol version the Collector can use. If omitted, the Collector uses the maximum version supported by the Go TLS library. -
instances[].tls.min_versionType:string. Optional. Minimum TLS protocol version the Collector can use. If omitted, the minimum version is TLS 1.2. -
instances[].tls.reload_intervalType:duration. Optional. How often the Collector reloads certificate and key files. If omitted, the Collector doesn’t reload the files. -
instances[].tls.server_name_overrideType:string. Optional. Server name to verify in the Vault certificate instead of the endpoint hostname. Use this setting when the certificate name differs from the endpoint hostname. -
instances[].tls.tpmType:object. Optional. Trusted platform module settings for the TLS private key. -
instances[].tls.tpm.authType:string. Optional. Authorization value for the trusted platform module key. -
instances[].tls.tpm.enabledType:boolean. Optional. Whether to use a trusted platform module for the TLS private key. If true, the Collector loads the key from the configured device or socket. If false, the Collector uses the configured key file or in-memory key. -
instances[].tls.tpm.owner_authType:string. Optional. Authorization value for the trusted platform module owner. -
instances[].tls.tpm.pathType:string. Optional. Path to the trusted platform module device or Unix domain socket, such as/dev/tpm0or/dev/tpmrm0.