-
Notifications
You must be signed in to change notification settings - Fork 223
[DOC] Update data retention API info #5624
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
base: doc-3.9.0
Are you sure you want to change the base?
Changes from 3 commits
3e65149
3fb254a
0d76274
4375303
2eef7b2
a36a5ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| --- | ||
| title: PMM Server Settings | ||
| title: Configure PMM Server settings | ||
| slug: pmm-server-settings | ||
| category: | ||
| uri: pmm-server-maintenance | ||
|
|
@@ -8,4 +8,54 @@ privacy: | |
| view: anyone_with_link | ||
| --- | ||
|
|
||
| This section will explain how to configure your PMM Server to get the most out of its functionality. | ||
| You can use the PMM Server Settings API to retrieve and update your PMM Server configuration programmatically. Use [Get settings](ref:getsettings) to check the current configuration, and [Change settings](ref:changesettings) to update it. | ||
|
|
||
| ## Get current settings | ||
|
|
||
| ```sh | ||
| curl -X GET https://<pmm-server-address>/v1/server/settings \ | ||
| -H "Authorization: Basic <base64-encoded-credentials>" | ||
| ``` | ||
|
|
||
| ## Change settings | ||
|
|
||
| ```sh | ||
| curl -X PUT https://<pmm-server-address>/v1/server/settings \ | ||
| -H "Authorization: Basic <base64-encoded-credentials>" \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to be consistent with the rest of the documentation, where we promote the use of Service Account Tokens, not the Basic Auth:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ademidoff thanks, updated with commit a36a5ba |
||
| -H "Content-Type: application/json" \ | ||
| -d '{"data_retention": "2592000s"}' | ||
| ``` | ||
|
|
||
| ## Field reference | ||
|
|
||
| ### data_retention | ||
|
|
||
| Use this field to set how long PMM retains Prometheus and QAN data. You must express the value in seconds. If you use hours or minutes, the request will fail with an error. | ||
|
|
||
| | Format | Example | Supported | | ||
| |--------|---------|--------| | ||
| | Seconds | `2592000s` | ✔ | | ||
| | Minutes | `43200m` | ✘ | | ||
| | Hours | `720h` | ✘ | | ||
|
|
||
| Common values: | ||
|
|
||
| | Retention period | Value | | ||
| |-----------------|-------| | ||
| | 7 days | `604800s` | | ||
| | 30 days | `2592000s` | | ||
| | 90 days | `7776000s` | | ||
|
|
||
| ### metrics_resolutions | ||
|
|
||
| Use this field to control how frequently PMM collects metrics. You can set high (`hr`), medium (`mr`), and low (`lr`) resolution intervals independently: | ||
|
|
||
| ```json | ||
| { | ||
| "metrics_resolutions": { | ||
| "hr": "5s", | ||
| "mr": "10s", | ||
| "lr": "60s" | ||
| } | ||
| } | ||
| ``` | ||
Uh oh!
There was an error while loading. Please reload this page.