Skip to content

Commit 08a6d3a

Browse files
committed
Product usage reporting docs (#28858)
* First draft of product usage reporting docs * Table data, fix issues * Changelog
1 parent f5e0fbc commit 08a6d3a

File tree

5 files changed

+231
-14
lines changed

5 files changed

+231
-14
lines changed

changelog/28858.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:feature
2+
**Product Usage Reporting**: Added product usage reporting, which collects anonymous, numerical, non-sensitive data about Vault feature usage, and adds it to the existing utilization reports.
3+
```

website/content/docs/configuration/index.mdx

+37-14
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ The format of this file is [HCL](https://github.com/hashicorp/hcl) or JSON.
1313

1414
An example configuration is shown below:
1515

16+
<Note>
17+
18+
For multi-node clusters, replace the loopback address with a valid, routable IP address for each Vault node in your network.
19+
20+
Refer to the [Vault HA clustering with integrated storage tutorial](/vault/tutorials/raft/raft-storage) for a complete scenario.
21+
22+
</Note>
23+
1624
```hcl
1725
ui = true
1826
cluster_addr = "https://127.0.0.1:8201"
@@ -66,15 +74,19 @@ to specify where the configuration is.
6674

6775
- `user_lockout` `([UserLockout][user-lockout]: nil)`
6876
Configures the user-lockout behaviour for failed logins. For more information, please see the
69-
[user lockout configuration documentation](/vault/docs/configuration/user-lockout).
77+
[user lockout configuration documentation](/vault/docs/configuration/user-lockout).
7078

7179
- `seal` `([Seal][seal]: nil)` – Configures the seal type to use for
7280
auto-unsealing, as well as for
7381
[seal wrapping][sealwrap] as an additional layer of data protection.
7482

75-
- `cluster_name` `(string: <generated>)` – Specifies the identifier for the
76-
Vault cluster. If omitted, Vault will generate a value. When connecting to
77-
Vault Enterprise, this value will be used in the interface.
83+
- `reporting` `([Reporting][reporting]: nil)` -
84+
Configures options relating to license reporting in Vault.
85+
86+
- `cluster_name` `(string: <generated>)` – Specifies a human-readable
87+
identifier for the Vault cluster. If omitted, Vault will generate a value.
88+
The cluster name is included as a label in some [telemetry metrics](/vault/docs/internals/telemetry/metrics/).
89+
The cluster name is safe to update on an existing Vault cluster.
7890

7991
- `cache_size` `(string: "131072")` – Specifies the size of the read cache used
8092
by the physical storage subsystem. The value is in number of entries, so the
@@ -115,10 +127,14 @@ to specify where the configuration is.
115127
sudo setcap cap_ipc_lock=+ep $(readlink -f $(which vault))
116128
```
117129

118-
~> Note: Since each plugin runs as a separate process, you need to do the same
130+
<Note>
131+
132+
Since each plugin runs as a separate process, you need to do the same
119133
for each plugin in your [plugins
120134
directory](/vault/docs/plugins/plugin-architecture#plugin-directory).
121135

136+
</Note>
137+
122138
If you use a Linux distribution with a modern version of systemd, you can add
123139
the following directive to the "[Service]" configuration section:
124140

@@ -169,10 +185,10 @@ to specify where the configuration is.
169185
maximum request duration allowed before Vault cancels the request. This can
170186
be overridden per listener via the `max_request_duration` value.
171187

172-
- `detect_deadlocks` `(string: "")` - A comma separated string that specifies the internal
173-
mutex locks that should be monitored for potential deadlocks. Currently supported values
188+
- `detect_deadlocks` `(string: "")` - A comma separated string that specifies the internal
189+
mutex locks that should be monitored for potential deadlocks. Currently supported values
174190
include `statelock`, `quotas` and `expiration` which will cause "POTENTIAL DEADLOCK:"
175-
to be logged when an attempt at a core state lock appears to be deadlocked. Enabling this
191+
to be logged when an attempt at a core state lock appears to be deadlocked. Enabling this
176192
can have a negative effect on performance due to the tracking of each lock attempt.
177193

178194
- `raw_storage_endpoint` `(bool: false)` – Enables the `sys/raw` endpoint which
@@ -210,12 +226,20 @@ can have a negative effect on performance due to the tracking of each lock attem
210226
Supported values (in order of descending detail) are `trace`, `debug`, `info`, `warn`, and `error`.
211227
This can also be specified via the `VAULT_LOG_LEVEL` environment variable.
212228

213-
~> Note: On SIGHUP (`sudo kill -s HUP` _pid of vault_), if a valid value is specified, Vault will update the existing log level,
229+
<Note>
230+
231+
On SIGHUP (`sudo kill -s HUP` _pid of vault_), if a valid value is specified, Vault will update the existing log level,
214232
overriding (even if specified) both the CLI flag and environment variable.
215233

216-
~> Note: Not all parts of Vault's logging can have its log level be changed dynamically this way; in particular,
234+
</Note>
235+
236+
<Note>
237+
238+
Not all parts of Vault's logging can have its log level be changed dynamically this way; in particular,
217239
secrets/auth plugins are currently not updated dynamically.
218240

241+
</Note>
242+
219243
- `log_format` - Equivalent to the [`-log-format` command-line flag](/vault/docs/commands/server#_log_format).
220244

221245
- `log_file` - Equivalent to the [`-log-file` command-line flag](/vault/docs/commands/server#_log_file).
@@ -236,9 +260,6 @@ can have a negative effect on performance due to the tracking of each lock attem
236260
When `imprecise_lease_role_tracking` is set to true and a new role-based quota is enabled, subsequent lease counts start from 0.
237261
`imprecise_lease_role_tracking` affects role-based lease count quotas, but reduces latencies when not using role based quotas.
238262

239-
- `request_limiter` `([Request Limiter][request-limiter]: <none>)` – Allows
240-
operators to enable Vault's Request Limiter functionality.
241-
242263
### High availability parameters
243264

244265
The following parameters are used on backends that support [high availability][high-availability].
@@ -283,6 +304,9 @@ The following parameters are only used with Vault Enterprise
283304
provided via the environment variable `VAULT_LICENSE_PATH`, or the license
284305
itself can be provided in the environment variable `VAULT_LICENSE`.
285306

307+
- `administrative_namespace_path` `(string: "")` - Specifies the absolute path
308+
to the Vault namespace to be used as an [Administrative namespace](/vault/docs/enterprise/namespaces/create-admin-namespace).
309+
286310
[storage-backend]: /vault/docs/configuration/storage
287311
[listener]: /vault/docs/configuration/listener
288312
[seal]: /vault/docs/configuration/seal
@@ -291,4 +315,3 @@ The following parameters are only used with Vault Enterprise
291315
[sentinel]: /vault/docs/configuration/sentinel
292316
[high-availability]: /vault/docs/concepts/ha
293317
[plugins]: /vault/docs/plugins
294-
[request-limiter]: /vault/docs/concepts/request-limiter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: docs
3+
page_title: Reporting - Configuration
4+
description: |-
5+
The reporting stanza specifies various parameters for tuning reporting and licensing related values.
6+
---
7+
8+
# `replication` stanza
9+
10+
@include 'alerts/enterprise-only.mdx'
11+
12+
The `reporting` stanza specifies various parameters for tuning replication related values.
13+
14+
Please see the pages relating to
15+
[license utilization reporting](/vault/docs/enterprise/license/utilization-reporting)
16+
and [product usage reporting](/vault/docs/enterprise/license/product-usage-reporting)
17+
for more information regarding the license reporting.
18+
19+
```hcl
20+
reporting {
21+
snapshot_retention_time = 9600
22+
disable_product_usage_reporting = false
23+
license {
24+
enabled = true
25+
}
26+
}
27+
```
28+
29+
## `reporting` parameters
30+
31+
- `snapshot_retention_time` `(duration: 9600h)` - The retention time for manual reporting snapshots in hours. Defaults to 9600 (400 days).
32+
Uses [duration format strings](/vault/docs/concepts/duration-format).
33+
- `disable_product_usage_reporting` `(boolean: false)` - Determines whether [product usage reporting](/vault/docs/enterprise/license/product-usage-reporting)
34+
is enabled.
35+
36+
## `license` parameters
37+
38+
- `enabled` `(boolean: true)` - Toggles automatic reporting of license utilization. See the
39+
[license utilization reporting](/vault/docs/enterprise/license/utilization-reporting)
40+
page for more details.
41+
- `billing_start_timestamp` `(timestamp)` - The start timestamp for billing for license reporting (manual and automated).
42+
Defaults to the license start timestamp.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
layout: docs
3+
page_title: Product usage reporting
4+
description: >-
5+
Learn what anonymous usage data HashiCorp collects as part of Enterprise utilization reporting. Enable or disable collection.
6+
---
7+
8+
# Product usage reporting
9+
10+
@include 'alerts/enterprise-only.mdx'
11+
12+
HashiCorp collects usage data about how Vault clusters are being used. This data is not
13+
used for billing or and is numerical only, and no sensitive information of
14+
any nature is being collected. The data is GDPR compliant and is collected as part of
15+
the [license utilization reporting](/vault/docs/enterprise/license/utilization-reporting)
16+
process. If automated reporting is enabled, this data will be collected automatically.
17+
If automated reporting is disabled, then this will be collected as part of the manual reports.
18+
19+
## Opt out
20+
21+
While none of the collected usage metrics are sensitive in any way, if you are still concerned
22+
about these usage metrics being reported, then you can opt-out of them being collected.
23+
24+
If you are considering opting out because you’re worried about the data, we
25+
strongly recommend that you review the [usage metrics list](#usage-metrics-list)
26+
before opting out. If you have concerns with any of the automatically-reported
27+
data please bring them to your account manager.
28+
29+
You have two options to opt out of product usage collection:
30+
31+
- HCL configuration (recommended)
32+
- Environment variable (requires restart)
33+
34+
35+
#### HCL configuration
36+
37+
Opting out in your product's configuration file doesn't require a system
38+
restart, and is the method we recommend. Add the following block to your server
39+
configuration file (e.g. `vault-config.hcl`).
40+
41+
```hcl
42+
reporting {
43+
disable_product_usage_reporting = true
44+
}
45+
```
46+
47+
<Warning>
48+
49+
When you have a cluster, each node must have the reporting stanza in its
50+
configuration to be consistent. In the event of leadership change, nodes will
51+
use its server configuration to determine whether or not to opt-out the
52+
product usage collection. Inconsistent configuration between nodes will change the
53+
reporting status upon active unseal.
54+
55+
</Warning>
56+
57+
58+
You will find the following entries in the server log.
59+
60+
<CodeBlockConfig hideClipboard>
61+
62+
```
63+
[DEBUG] activity: there is no reporting agent configured, skipping counts reporting
64+
```
65+
66+
</CodeBlockConfig>
67+
68+
#### Environment variable
69+
70+
If you need to, you can also opt out using an environment variable, which will
71+
provide a startup message confirming that you have product usage data collection.
72+
This option requires a system restart.
73+
74+
<Note>
75+
76+
If the reporting stanza exists in the configuration file, the
77+
`OPTOUT_PRODUCT_USAGE_REPORTING` value overrides the configuration.
78+
79+
</Note>
80+
81+
Set the following environment variable.
82+
83+
```shell-session
84+
$ export OPTOUT_PRODUCT_USAGE_REPORTING=true
85+
```
86+
87+
Now, restart your [Vault servers](/vault/docs/commands/server) from the shell
88+
where you set the environment variable.
89+
90+
You will find the following entries in the server log.
91+
92+
<CodeBlockConfig hideClipboard>
93+
94+
```
95+
[DEBUG] core: product usage reporting disabled
96+
```
97+
98+
</CodeBlockConfig>
99+
100+
If your configuration file and environment variable differ, the environment
101+
variable setting will take precedence.
102+
103+
## Usage metrics list
104+
105+
HashiCorp collects the following product usage metrics as part of the `metrics` part of the
106+
[JSON payload that it collects for licence utilization](/vault/docs/enterprise/license/utilization-reporting#example-payloads).
107+
All of these metrics are numerical, and contain no sensitive values or additional metadata:
108+
109+
| Metric Name | Description |
110+
|--------------------------------------------|--------------------------------------------------------------------------|
111+
| `vault.namespaces.count` | Total number of namespaces. |
112+
| `vault.leases.count` | Total number of leases within Vault. |
113+
| `vault.quotas.ratelimit.count` | Total number of rate limit quotas within Vault. |
114+
| `vault.quotas.leasecount.count` | Total number of lease count quotas within Vault. |
115+
| `vault.kv.version1.secrets.count` | Total number of KVv1 secrets within Vault. |
116+
| `vault.kv.version2.secrets.count` | Total number of KVv2 secrets within Vault. |
117+
| `vault.kv.version1.secrets.namespace.max` | The highest number of KVv1 secrets in a namespace in Vault, e.g. `1000`. |
118+
| `vault.kv.version2.secrets.namespace.max` | The highest number of KVv2 secrets in a namespace in Vault, e.g. `1000`. |
119+
| `vault.kv.version1.secrets.namespace.min` | The lowest number of KVv1 secrets in a namespace in Vault, e.g. `2`. |
120+
| `vault.kv.version2.secrets.namespace.min` | The highest number of KVv2 secrets in a namespace in Vault, e.g. `1000`. |
121+
| `vault.kv.version1.secrets.namespace.mean` | The mean number of KVv1 secrets in namespaces in Vault, e.g. `52.8`. |
122+
| `vault.kv.version1.secrets.namespace.mean` | The mean number of KVv2 secrets in namespaces in Vault, e.g. `52.8`. |
123+
124+
## Usage metadata list
125+
126+
HashiCorp collects the following product usage metadata as part of the `metadata` part of the
127+
[JSON payload that it collects for licence utilization](/vault/docs/enterprise/license/utilization-reporting#example-payloads):
128+
129+
| Metadata Name | Description |
130+
|----------------------|----------------------------------------------------------------------|
131+
| `replication_status` | Replication status of this cluster, e.g. `perf-disabled,dr-disabled` |

website/data/docs-nav-data.json

+18
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,15 @@
387387
},
388388
"path": "configuration/replication"
389389
},
390+
{
391+
"title": "<code>reporting</code>",
392+
"badge": {
393+
"text": "ENTERPRISE",
394+
"type": "outlined",
395+
"color": "neutral"
396+
},
397+
"path": "configuration/reporting"
398+
},
390399
{
391400
"title": "<code>seal</code>",
392401
"routes": [
@@ -440,6 +449,11 @@
440449
},
441450
{
442451
"title": "<code>sentinel</code>",
452+
"badge": {
453+
"text": "ENTERPRISE",
454+
"type": "outlined",
455+
"color": "neutral"
456+
},
443457
"path": "configuration/sentinel"
444458
},
445459
{
@@ -2700,6 +2714,10 @@
27002714
"title": "Manual license utilization reporting",
27012715
"path": "enterprise/license/manual-reporting"
27022716
},
2717+
{
2718+
"title": "Product usage reporting",
2719+
"path": "enterprise/license/product-usage-reporting"
2720+
},
27032721
{
27042722
"title": "FAQ",
27052723
"path": "enterprise/license/faq"

0 commit comments

Comments
 (0)