Skip to main content
Version: NG-2.13

Vault

Introduction

HashiCorp Vault is a secure data platform that provides secrets management, encryption as service, and identity based access. Vault centrally stores, accesses, and distributes dynamic secrets such as tokens, passwords, certificates, and encryption keys. Vault also keeps application data secure with centralized key management and simple APIs for data encryption.

Getting Started

Compatibility

vuSmartMaps supports the monitoring of the Vault metric using prometheus endpoint.

Data Collection Method

vuSmartMaps collects health and performance data for Vault using VuNet's Internal Data Collector.

Prerequisites

Inputs for Configuring Data Source

  • Vault Server: The IP Address/FQDN of the Vault server. This field is the key to identify each server you add here.
  • Vault's Endpoint: The metrics endpoint of the Vault server. Eg: http://127.0.0.1, https://127.0.0.1, http://127.0.0.1:8200 or https://127.0.0.1:8200
  • Authentication Enabled on Vault Server Endpoint?: Whether the authentication has been enabled on Vault server endpoint to communicate?
  • Token: Enter the authentication token for Vault server.
  • Period (in seconds): Time interval for polling data from the Vault Server. Period should be between 60 seconds – 3000 seconds.

Firewall Requirement

To collect data from this O11ySource, ensure the following ports are opened:

Source IPDestination IPDestination PortProtocolDirection
vuSmartMaps IPVault Server8200*TCPOutbound

*Before providing the firewall requirements, please update the port based on the customer environment.

Configuring the Target

Health and Performance metrics from prometheus endpoint. Telemetry endpoint must be enabled in the vault server so that /metrics endpoint must accessible from the vuSmartMaps Server.

How to enable the telemetry endpoint in Vault serverBelow are the two methods using which telemetry endpoint can be enabled in Vault server:

  • Using token based authentication tokenBelow is the instruction to create the client to authenticate the Vault telemetry endpoint:
  • *Store the below read-only policy file content in the json named read-only-policy.json.
{
"policy": "path \"secret/*\" { capabilities = [\"read\"] }\npath \"sys/metrics\" { capabilities = [\"read\"] }"
}
  • *Upload the read only policy to the Vault using below API.
curl --header "X-Vault-Token: <vault_root_token>" --request PUT --data @read-only-policy.json http://<vault_address>:8200/v1/sys/policies/acl/read-only-policy
  • *Generate the token with read-only policy attached.
curl --header "X-Vault-Token: <vault_root_token>" --request POST --data '{"policies": ["read-only-policy"]}' http://<vault_address>:8200/v1/auth/token/create
  • Using unauthenticated accessTo enable the telemetry endpoint using unauthenticated access, the below config needs to be added into the vault configuration file and restart of the server may be required to apply the configuration. Administrator is recommended to follow the unsealing procedure whenever Vault is restarted.
listener "tcp" {
address = "0.0.0.0:8200"
cluster_addr = "0.0.0.0:8201"
tls_disable = true
telemetry {
unauthenticated_metrics_access = "true"
}
}

Configuration Steps

  • Enable the O11ySource.
  • Select the sources tab and press the + button to add a new instance that has to be monitored.
  • Provide the required configurations:
    • Vault Server
  • *Vault's Endpoint
    • Authentication Enabled on Vault Server Endpoint?
  • *Token
  • *Period (in seconds)
  • Click Save to close the data source window.

Metrics Collected

NameDescriptionData Type
@timestampOriginal timestamp in string formatString
timestampPrecise timestamp with millisecondsDateTime64(3)
o11ysource_nameName of the O11ySource, a logical groupingLowCardinality(String)
targetTarget system or resourceString
hostHost identifierString
tenant_idTenant ID associated with the resourceLowCardinality(String)
bu_idBusiness unit IDLowCardinality(String)
tagsAdditional metadata tagsMap(LowCardinality(String), String)
nameName of the event or metricLowCardinality(String)
metric_nameName of the metric being trackedLowCardinality(String)
metric_valueValue of the metricFloat64
metric_value_diffDifference in metric value compared to previousFloat64
intervalInterval of metric collection (in seconds)UInt8