Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Count Docs Updates/Cleanup #27862

Merged
merged 6 commits into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 40 additions & 34 deletions website/content/api-docs/system/internal-counters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,6 @@ $ curl \
This endpoint returns client activity information for a given billing
period, which is represented by the `start_time` and `end_time` parameters.

There are a few things to keep in mind while using this API.

- For Vault versions before 1.11, the activity information only accounts for
the activity of the latest contiguous months in the billing period.
For example, if the billing period is from Jan 2022 to June 2022, and the
activity subsystem in Vault was not capturing data for the months Jan to March,
the response will only include information for May and June. Note that if no
`start_time` and `end_time` parameters are specified, the billing period defaults
Copy link
Contributor Author

@divyaac divyaac Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted this start_time/end_time information because it duplicates info at the bottom when we explain the parameters at the bottom with the API.

to 12 months, so the endpoint will return activity information from the end of the
previous month to the start of 12 months prior to that date.

- As of 1.11, this behavior has been modified to return all available data within
the specified billing period.

- As of 1.12, the `end_time` can be the current month.

- The response contains the total activity for the billing period and the
attributions of the total activity against specific components in Vault. This
helps in understanding the total activity better by knowing which components in
Expand Down Expand Up @@ -239,21 +223,19 @@ Vault lead to the new clients for each month.
}
```

- If the `end_date` supplied to the API is for the current month, the activity
information returned by this API will only be till the previous month. The
activity system is designed to process the accumulated activity only at the end
of the month. Since the system does not fully process the current month's
information, it will not be added to the API response.
- The response includes month data for the entire queried period, but may
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addresses the confusion in this thread

not exactly match the `start_time` and `end_time` returned in the response.
The `start_time` in the response is the earliest time there is activity data
in the queried period. The `end_time` is the end of the final month of the queried
period.

- The response includes the actual time period covered, which may not exactly
match the query parameters due to the month granularity of data or missing
months in the requested time range.
- If the `end_date` supplied to the API is the current month, exact activity
information will be returned for all months in the queried period, except for the
current month. The last element in the `months` response stanza will signify the current month. Furthermore, the
`new_clients` counts returned for the current month will be an estimate.

The following is an example of the `months` breakdown with just the current month information.

- Note that if the `end_date` specified is the current month,
the last element in the `months` response stanza, signifying the current month, will
not have namespace attribution for the `new_clients` stanza. Furthermore, the
`new_clients` counts returned for the current month will be an approximation.
That is to say, the response will appear as follows.

```json
{
Expand Down Expand Up @@ -300,7 +282,35 @@ That is to say, the response will appear as follows.
"acme_clients":"approx int value",
"clients":"approx int value"
},
"namespaces":[]
"namespaces":[
{
"namespace_id":"root",
"namespace_path":"",
"counts":{},
"mounts":[
{
"path":"auth/up2/",
"counts":{
"entity_clients":"approx int value",
"non_entity_clients":"approx int value",
"secret_syncs":"approx int value",
"acme_clients":"approx int value",
"clients":"approx int value"
},
},
{
"path":"auth/up1/",
"counts":{
"entity_clients":"approx int value",
"non_entity_clients":"approx int value",
"secret_syncs":"approx int value",
"acme_clients":"approx int value",
"clients":"approx int value"
}
}
]
}
]
}
}
],
Expand All @@ -319,7 +329,6 @@ be listed as "deleted namespace :ID:." Deleted namespaces are reported only for
queries in the root namespace because the information about the namespace path
is unknown.

This endpoint was added in Vault 1.6.

@include 'alerts/restricted-root.mdx'

Expand Down Expand Up @@ -835,8 +844,6 @@ Note: the client count may be inaccurate in the moments following a Vault
reboot, or leadership change. The estimate will stabilize when background
loading of client data has completed.

This endpoint was added in Vault 1.7.

@include 'alerts/restricted-root.mdx'

| Method | Path |
Expand Down Expand Up @@ -1066,7 +1073,6 @@ months in the requested time range.
information returned by this API will include activity for this month, however
it may be up to 20 minutes delayed.

This endpoint was added in Vault 1.11.

@include 'alerts/restricted-root.mdx'

Expand Down
Loading