2017-03-08 02:47:23 +00:00
---
2020-01-18 00:18:09 +00:00
layout: docs
page_title: Telemetry - Configuration
sidebar_title: <code>telemetry</code>
2017-03-08 02:47:23 +00:00
description: |-
The telemetry stanza specifies various configurations for Vault to publish
metrics to upstream systems.
---
# `telemetry` Stanza
The `telemetry` stanza specifies various configurations for Vault to publish
2020-01-08 18:32:09 +00:00
metrics to upstream systems. Available Vault metrics can be found in the
2020-01-22 20:05:41 +00:00
[Telemetry internals documentation](/docs/internals/telemetry).
2017-03-08 02:47:23 +00:00
```hcl
telemetry {
statsite_address = "statsite.company.local:8125"
}
```
## `telemetry` Parameters
Due to the number of configurable parameters to the `telemetry` stanza,
parameters on this page are grouped by the telemetry provider.
### Common
The following options are available on all telemetry configurations.
2020-01-18 00:18:09 +00:00
- `disable_hostname` `(bool: false)` - Specifies if gauge values should be
2017-03-08 02:47:23 +00:00
prefixed with the local hostname.
2020-01-18 00:18:09 +00:00
- `enable_hostname_label` `(bool: false)` - Specifies if all metric values should
2019-12-02 16:51:02 +00:00
contain the `host` label with the local hostname. It is recommended to enable
`disable_hostname` if this option is used.
2017-03-08 02:47:23 +00:00
### `statsite`
These `telemetry` parameters apply to
[statsite](https://github.com/armon/statsite).
2020-01-18 00:18:09 +00:00
- `statsite_address` `(string: "")` - Specifies the address of a statsite server
2017-03-08 02:47:23 +00:00
to forward metrics data to.
```hcl
telemetry {
statsite_address = "statsite.company.local:8125"
}
```
### `statsd`
These `telemetry` parameters apply to
[statsd](https://github.com/etsy/statsd).
2020-01-18 00:18:09 +00:00
- `statsd_address` `(string: "")` - Specifies the address of a statsd server to
2017-03-08 02:47:23 +00:00
forward metrics to.
```hcl
telemetry {
statsd_address = "statsd.company.local:8125"
}
```
### `circonus`
2017-06-17 03:51:46 +00:00
These `telemetry` parameters apply to [Circonus](http://circonus.com/).
2017-03-08 02:47:23 +00:00
2020-01-18 00:18:09 +00:00
- `circonus_api_token` `(string: "")` - Specifies a valid Circonus API Token
2017-03-08 02:47:23 +00:00
used to create/manage check. If provided, metric management is enabled.
2020-01-18 00:18:09 +00:00
- `circonus_api_app` `(string: "nomad")` - Specifies a valid app name associated
2017-03-08 02:47:23 +00:00
with the API token.
2020-01-18 00:18:09 +00:00
- `circonus_api_url` `(string: "https://api.circonus.com/v2")` - Specifies the
2017-03-08 02:47:23 +00:00
base URL to use for contacting the Circonus API.
2020-01-18 00:18:09 +00:00
- `circonus_submission_interval` `(string: "10s")` - Specifies the interval at
2017-03-08 02:47:23 +00:00
which metrics are submitted to Circonus.
2020-01-18 00:18:09 +00:00
- `circonus_submission_url` `(string: "")` - Specifies the
2017-03-08 02:47:23 +00:00
`check.config.submission_url` field, of a Check API object, from a previously
created HTTPTRAP check.
2020-01-18 00:18:09 +00:00
- `circonus_check_id` `(string: "")` - Specifies the Check ID (**not check
2017-03-08 02:47:23 +00:00
bundle**) from a previously created HTTPTRAP check. The numeric portion of the
`check._cid` field in the Check API object.
2020-01-18 00:18:09 +00:00
- `circonus_check_force_metric_activation` `(bool: false)` - Specifies if force
2017-03-08 02:47:23 +00:00
activation of metrics which already exist and are not currently active. If
check management is enabled, the default behavior is to add new metrics as
they are encountered. If the metric already exists in the check, it will
not be activated. This setting overrides that behavior.
2020-01-18 00:18:09 +00:00
- `circonus_check_instance_id` `(string: "<hostname>:<application>")` - Serves
New Docs Website (#5535)
* conversion stage 1
* correct image paths
* add sidebar title to frontmatter
* docs/concepts and docs/internals
* configuration docs and multi-level nav corrections
* commands docs, index file corrections, small item nav correction
* secrets converted
* auth
* add enterprise and agent docs
* add extra dividers
* secret section, wip
* correct sidebar nav title in front matter for apu section, start working on api items
* auth and backend, a couple directory structure fixes
* remove old docs
* intro side nav converted
* reset sidebar styles, add hashi-global-styles
* basic styling for nav sidebar
* folder collapse functionality
* patch up border length on last list item
* wip restructure for content component
* taking middleman hacking to the extreme, but its working
* small css fix
* add new mega nav
* fix a small mistake from the rebase
* fix a content resolution issue with middleman
* title a couple missing docs pages
* update deps, remove temporary markup
* community page
* footer to layout, community page css adjustments
* wip downloads page
* deps updated, downloads page ready
* fix community page
* homepage progress
* add components, adjust spacing
* docs and api landing pages
* a bunch of fixes, add docs and api landing pages
* update deps, add deploy scripts
* add readme note
* update deploy command
* overview page, index title
* Update doc fields
Note this still requires the link fields to be populated -- this is solely related to copy on the description fields
* Update api_basic_categories.yml
Updated API category descriptions. Like the document descriptions you'll still need to update the link headers to the proper target pages.
* Add bottom hero, adjust CSS, responsive friendly
* Add mega nav title
* homepage adjustments, asset boosts
* small fixes
* docs page styling fixes
* meganav title
* some category link corrections
* Update API categories page
updated to reflect the second level headings for api categories
* Update docs_detailed_categories.yml
Updated to represent the existing docs structure
* Update docs_detailed_categories.yml
* docs page data fix, extra operator page remove
* api data fix
* fix makefile
* update deps, add product subnav to docs and api landing pages
* Rearrange non-hands-on guides to _docs_
Since there is no place for these on learn.hashicorp, we'll put them
under _docs_.
* WIP Redirects for guides to docs
* content and component updates
* font weight hotfix, redirects
* fix guides and intro sidenavs
* fix some redirects
* small style tweaks
* Redirects to learn and internally to docs
* Remove redirect to `/vault`
* Remove `.html` from destination on redirects
* fix incorrect index redirect
* final touchups
* address feedback from michell for makefile and product downloads
2018-10-19 15:40:11 +00:00
to uniquely identify the metrics coming from this _instance_. It can be used
2017-03-08 02:47:23 +00:00
to maintain metric continuity with transient or ephemeral instances as they
move around within an infrastructure. By default, this is set to
hostname:application name (e.g. "host123:nomad").
2020-01-18 00:18:09 +00:00
- `circonus_check_search_tag` `(string: <service>:<application>)` - Specifies a
2017-03-08 02:47:23 +00:00
special tag which, when coupled with the instance id, helps to narrow down the
search results when neither a Submission URL or Check ID is provided. By
default, this is set to service:app (e.g. "service:nomad").
2020-01-18 00:18:09 +00:00
- `circonus_check_display_name` `(string: "")` - Specifies a name to give a
New Docs Website (#5535)
* conversion stage 1
* correct image paths
* add sidebar title to frontmatter
* docs/concepts and docs/internals
* configuration docs and multi-level nav corrections
* commands docs, index file corrections, small item nav correction
* secrets converted
* auth
* add enterprise and agent docs
* add extra dividers
* secret section, wip
* correct sidebar nav title in front matter for apu section, start working on api items
* auth and backend, a couple directory structure fixes
* remove old docs
* intro side nav converted
* reset sidebar styles, add hashi-global-styles
* basic styling for nav sidebar
* folder collapse functionality
* patch up border length on last list item
* wip restructure for content component
* taking middleman hacking to the extreme, but its working
* small css fix
* add new mega nav
* fix a small mistake from the rebase
* fix a content resolution issue with middleman
* title a couple missing docs pages
* update deps, remove temporary markup
* community page
* footer to layout, community page css adjustments
* wip downloads page
* deps updated, downloads page ready
* fix community page
* homepage progress
* add components, adjust spacing
* docs and api landing pages
* a bunch of fixes, add docs and api landing pages
* update deps, add deploy scripts
* add readme note
* update deploy command
* overview page, index title
* Update doc fields
Note this still requires the link fields to be populated -- this is solely related to copy on the description fields
* Update api_basic_categories.yml
Updated API category descriptions. Like the document descriptions you'll still need to update the link headers to the proper target pages.
* Add bottom hero, adjust CSS, responsive friendly
* Add mega nav title
* homepage adjustments, asset boosts
* small fixes
* docs page styling fixes
* meganav title
* some category link corrections
* Update API categories page
updated to reflect the second level headings for api categories
* Update docs_detailed_categories.yml
Updated to represent the existing docs structure
* Update docs_detailed_categories.yml
* docs page data fix, extra operator page remove
* api data fix
* fix makefile
* update deps, add product subnav to docs and api landing pages
* Rearrange non-hands-on guides to _docs_
Since there is no place for these on learn.hashicorp, we'll put them
under _docs_.
* WIP Redirects for guides to docs
* content and component updates
* font weight hotfix, redirects
* fix guides and intro sidenavs
* fix some redirects
* small style tweaks
* Redirects to learn and internally to docs
* Remove redirect to `/vault`
* Remove `.html` from destination on redirects
* fix incorrect index redirect
* final touchups
* address feedback from michell for makefile and product downloads
2018-10-19 15:40:11 +00:00
check when it is created. This name is displayed in the Circonus UI Checks
list.
2017-03-08 02:47:23 +00:00
2020-01-18 00:18:09 +00:00
- `circonus_check_tags` `(string: "")` - Comma separated list of additional
2017-03-08 02:47:23 +00:00
tags to add to a check when it is created.
2020-01-18 00:18:09 +00:00
- `circonus_broker_id` `(string: "")` - Specifies the ID of a specific Circonus
2017-03-08 02:47:23 +00:00
Broker to use when creating a new check. The numeric portion of `broker._cid`
field in a Broker API object. If metric management is enabled and neither a
Submission URL nor Check ID is provided, an attempt will be made to search for
an existing check using Instance ID and Search Tag. If one is not found, a new
HTTPTRAP check will be created. By default, this is a random
Enterprise Broker is selected, or, the default Circonus Public Broker.
2020-01-18 00:18:09 +00:00
- `circonus_broker_select_tag` `(string: "")` - Specifies a special tag which
2017-03-08 02:47:23 +00:00
will be used to select a Circonus Broker when a Broker ID is not provided. The
best use of this is to as a hint for which broker should be used based on
New Docs Website (#5535)
* conversion stage 1
* correct image paths
* add sidebar title to frontmatter
* docs/concepts and docs/internals
* configuration docs and multi-level nav corrections
* commands docs, index file corrections, small item nav correction
* secrets converted
* auth
* add enterprise and agent docs
* add extra dividers
* secret section, wip
* correct sidebar nav title in front matter for apu section, start working on api items
* auth and backend, a couple directory structure fixes
* remove old docs
* intro side nav converted
* reset sidebar styles, add hashi-global-styles
* basic styling for nav sidebar
* folder collapse functionality
* patch up border length on last list item
* wip restructure for content component
* taking middleman hacking to the extreme, but its working
* small css fix
* add new mega nav
* fix a small mistake from the rebase
* fix a content resolution issue with middleman
* title a couple missing docs pages
* update deps, remove temporary markup
* community page
* footer to layout, community page css adjustments
* wip downloads page
* deps updated, downloads page ready
* fix community page
* homepage progress
* add components, adjust spacing
* docs and api landing pages
* a bunch of fixes, add docs and api landing pages
* update deps, add deploy scripts
* add readme note
* update deploy command
* overview page, index title
* Update doc fields
Note this still requires the link fields to be populated -- this is solely related to copy on the description fields
* Update api_basic_categories.yml
Updated API category descriptions. Like the document descriptions you'll still need to update the link headers to the proper target pages.
* Add bottom hero, adjust CSS, responsive friendly
* Add mega nav title
* homepage adjustments, asset boosts
* small fixes
* docs page styling fixes
* meganav title
* some category link corrections
* Update API categories page
updated to reflect the second level headings for api categories
* Update docs_detailed_categories.yml
Updated to represent the existing docs structure
* Update docs_detailed_categories.yml
* docs page data fix, extra operator page remove
* api data fix
* fix makefile
* update deps, add product subnav to docs and api landing pages
* Rearrange non-hands-on guides to _docs_
Since there is no place for these on learn.hashicorp, we'll put them
under _docs_.
* WIP Redirects for guides to docs
* content and component updates
* font weight hotfix, redirects
* fix guides and intro sidenavs
* fix some redirects
* small style tweaks
* Redirects to learn and internally to docs
* Remove redirect to `/vault`
* Remove `.html` from destination on redirects
* fix incorrect index redirect
* final touchups
* address feedback from michell for makefile and product downloads
2018-10-19 15:40:11 +00:00
_where_ this particular instance is running (e.g. a specific geo location or
2017-03-08 02:47:23 +00:00
datacenter, dc:sfo).
2017-06-17 03:51:46 +00:00
### `dogstatsd`
These `telemetry` parameters apply to
[DogStatsD](http://docs.datadoghq.com/guides/dogstatsd/).
2020-01-18 00:18:09 +00:00
- `dogstatsd_addr` `(string: "")` - This provides the address of a DogStatsD
2017-06-17 03:51:46 +00:00
instance. DogStatsD is a protocol-compatible flavor of statsd, with the added
ability to decorate metrics with tags and event information. If provided,
2017-06-22 19:12:28 +00:00
Vault will send various telemetry information to that instance for
2017-06-17 03:51:46 +00:00
aggregation. This can be used to capture runtime information.
2020-01-18 00:18:09 +00:00
* `dogstatsd_tags` `(string array: [])` - This provides a list of global tags
2017-06-17 03:51:46 +00:00
that will be added to all telemetry packets sent to DogStatsD. It is a list
of strings, where each string looks like "my_tag_name:my_tag_value".
2019-03-23 21:53:43 +00:00
### `prometheus`
These `telemetry` parameters apply to
[prometheus](https://prometheus.io).
2020-01-18 00:18:09 +00:00
- `prometheus_retention_time` `(string: "24h")` - Specifies the amount of time that
2020-03-02 16:21:50 +00:00
Prometheus metrics are retained in memory.
- `disable_hostname` `(bool: false)` - It is recommended to also enable the option
`disable_hostname` to avoid having prefixed metrics with hostname.
2019-03-23 21:53:43 +00:00
2020-03-02 16:21:50 +00:00
The `/v1/sys/metrics` endpoint is only accessible on active nodes
and automatically disabled on standby nodes. You can enable the `/v1/sys/metrics`
endpoint on standby nodes by [enabling unauthenticated metrics access][telemetry-tcp].
Vault does not use the default Prometheus path, so Prometheus must be configured
with the path below.
Note that using `?format=prometheus` in the path won't work as "?" will be
escaped, so it must be specified as a parameter.
A Vault token is required with `capabilities = ["read", "list"]` to
/v1/sys/metrics. The Prometheus `bearer_token` or `bearer_token_file` options
must be added to the scrape job.
An example job_name stanza required in the [Prometheus config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config) is provided below.
2019-03-23 21:53:43 +00:00
```
2020-03-02 16:21:50 +00:00
# prometheus.yml
scrape_configs:
- job_name: 'vault'
metrics_path: "/v1/sys/metrics"
params:
format: ['prometheus']
scheme: https
tls_config:
ca_file: your_ca_here.pem
bearer_token: "your_vault_token_here"
static_configs:
- targets: ['your_vault_server_here:8200']
```
An example telemetry configuration to be added to Vault's configuration file is shown below:
2019-03-23 21:53:43 +00:00
```hcl
telemetry {
prometheus_retention_time = "30s",
disable_hostname = true
}
```
2019-08-20 21:47:08 +00:00
### `stackdriver`
These `telemetry` parameters apply to [Stackdriver Monitoring](https://cloud.google.com/monitoring/).
The Stackdriver telemetry provider uses the official Google Cloud Golang SDK. This means
it supports the common ways of
[providing credentials to Google Cloud](https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application).
To use this telemetry provider, the service account must have the following
minimum scope(s):
```text
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/monitoring
https://www.googleapis.com/auth/monitoring.write
```
And the following IAM role(s):
```text
roles/monitoring.metricWriter
```
2020-01-18 00:18:09 +00:00
- `stackdriver_project_id` the Google Cloud ProjectID to send telemetry data to.
- `stackdriver_location` the GCP or AWS region of the monitored resource.
- `stackdriver_namespace` a namespace identifier for the telemetry data.
2019-08-20 21:47:08 +00:00
It is recommended to also enable the option `disable_hostname` to avoid having prefixed
2020-01-18 00:18:09 +00:00
metrics with hostname and enable instead `enable_hostname_label`.
2019-08-20 21:47:08 +00:00
```hcl
telemetry {
stackdriver_project_id = "my-test-project"
stackdriver_location = "us-east1-a"
stackdriver_namespace = "vault-cluster-a"
disable_hostname = true
2019-12-02 16:51:02 +00:00
enable_hostname_label = true
2019-08-20 21:47:08 +00:00
}
```
2020-02-07 08:30:25 +00:00
[telemetry-tcp]: /docs/configuration/listener/tcp#telemetry
2020-03-02 16:21:50 +00:00