Skip to content

Commit

Permalink
update changed variable list
Browse files Browse the repository at this point in the history
  • Loading branch information
idoqo committed Apr 2, 2024
1 parent 3e64259 commit d52729d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
- REVIEWDOG_GITHUB_API_TOKEN=${REVIEWDOG_GITHUB_API_TOKEN}
- PMM_LESS_LOG_NOISE=1
- PMM_RELEASE_PATH=/root/go/bin
- PMM_ENABLE_RBAC=${PMM_ENABLE_RBAC:-0}
- PMM_ENABLE_ACCESS_CONTROL=${PMM_ENABLE_ACCESS_CONTROL:-0}
- PMM_DEV_VERSION_SERVICE_URL=${PMM_DEV_VERSION_SERVICE_URL}
# - PMM_DEV_PERCONA_PLATFORM_ADDRESS=https://check.localhost
# - PMM_DEV_PERCONA_PLATFORM_INSECURE=1
Expand Down
6 changes: 2 additions & 4 deletions docs/process/v2_to_v3_environment_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ Below is a list of affected variables and their new names.

| PMM 2 | PMM 3 | Comments |
|-----------------------------------------------|--------------------------------------------|--------------------------------------------------------------|
| `CONTAINER` | `PMM_CONTAINER` | |
| `DATA_RETENTION` | `PMM_DATA_RETENTION` | |
| `DISABLE_ALERTING` | `PMM_DISABLE_ALERTING` | |
| `DISABLE_UPDATES` | `PMM_DISABLE_UPDATES` | |
| `DISABLE_TELEMETRY` | `PMM_DISABLE_TELEMETRY` | |
| `PERCONA_PLATFORM_API_TIMEOUT` | `PMM_PERCONA_PLATFORM_API_TIMEOUT` | |
| `DISABLE_BACKUP_MANAGEMENT` | `PMM_DISABLE_BACKUP_MANAGEMENT` | |
| `ENABLE_AZUREDISCOVER` | `PMM_ENABLE_AZURE_DISCOVER` | |
| `ENABLE_RBAC` | `PMM_ENABLE_RBAC` | |
| `ENABLE_RBAC` | `PMM_ENABLE_RBAC` | |
| `ENABLE_RBAC` | `PMM_ENABLE_ACCESS_CONTROL` | |
| `LESS_LOG_NOISE` | `PMM_LESS_LOG_NOISE` | |
| `METRICS_RESOLUTION` | `PMM_METRICS_RESOLUTION` | |
| `METRICS_RESOLUTION_HR` | `PMM_METRICS_RESOLUTION_HR` | |
Expand All @@ -31,7 +29,7 @@ Below is a list of affected variables and their new names.
| `PERCONA_TEST_PMM_CLICKHOUSE_BLOCK_SIZE` | `PMM_CLICKHOUSE_BLOCK_SIZE` | |
| `PERCONA_TEST_PMM_CLICKHOUSE_DATABASE` | `PMM_CLICKHOUSE_DATABASE` | |
| `PERCONA_TEST_PMM_CLICKHOUSE_DATASOURCE` | `PMM_CLICKHOUSE_DATASOURCE` | |
| `PERCONA_TEST_PMM_CLICKHOUSE_HOST` | `PMM_CLICKHOUSE_HOST` | |
| `PERCONA_TEST_PMM_CLICKHOUSE_HOST` | `PERCONA_DEV_PMM_CLICKHOUSE_HOST` | |
| `PERCONA_TEST_PMM_CLICKHOUSE_POOL_SIZE` | `PMM_CLICKHOUSE_POOL_SIZE` | |
| `PERCONA_TEST_PMM_CLICKHOUSE_PORT` | `PMM_CLICKHOUSE_PORT` | |
| `PERCONA_TEST_PMM_DISABLE_BUILTIN_CLICKHOUSE` | `PMM_DISABLE_BUILTIN_CLICKHOUSE` | |
Expand Down
34 changes: 15 additions & 19 deletions managed/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,21 @@ go test -timeout=30s -p 1 ./...

## Available test environment variables:

| Variable | Description | Default |
|-----------------------------------------|---------------------------------------------------------------------------------------------------------------------|------------------------------------------|
| PMM_CLICKHOUSE_ADDR | Sets Clickhouse address | 127.0.0.1:9000 |
| PMM_CLICKHOUSE_DATABASE | Sets Clickhouse database | pmm |
| PMM_CLICKHOUSE_POOL_SIZE | Sets Clickhouse connections pool size | none |
| PMM_CLICKHOUSE_BLOCK_SIZE | Sets Clickhouse block size | none |
| PMM_ADVISORS_STARLARK_ALLOW_RECURSION | Allows recursive functions in checks scripts | false |
| PMM_NICER_API | Enables nicer API with default/zero values in response. | false |
| PMM_DEV_VERSION_SERVICE_URL | Sets versions service URL | https://check.percona.com/versions/v1 |
| PMM_DEV_ADVISOR_CHECKS_FILE | Specifies path to local checks file and disables downlading checks files from Percona Platform | none |
| PMM_ADVISORS_CHECKS_DISABLE_START_DELAY | Disables checks service startup delay | false |
| PMM_DEV_TELEMETRY_INTERVAL | Sets telemetry reporting interval | 24h |
| PMM_DEV_TELEMETRY_DISABLE_SEND | Disables sending of telemetry data to SaaS. This param doesn't affect telemetry data gathering from the datasources | false |
| PMM_DEV_TELEMETRY_FILE | Sets path for telemetry config file | |
| PMM_DEV_TELEMETRY_DISABLE_START_DELAY | Disable the default telemetry execution start delay, so that telemetry gathering is run immediately upon system | false |
| PMM_DEV_TELEMETRY_RETRY_BACKOFF | Sets telemetry reporting retry backoff time | 1h |
| PMM_DEV_PERCONA_PLATFORM_ADDRESS | Sets Percona Platform address | https://check.percona.com |
| PMM_DEV_PERCONA_PLATFORM_INSECURE | Allows insecure TLS connections to Percona Platform | false |
| PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY | Sets Percona Platform public key (Minisign) | set of keys embedded into managed binary |
| Variable | Description | Default |
|------------------------------------------|---------------------------------------------------------------------------------------------------------------------|------------------------------------------|
| PMM_DEV_ADVISOR_STARLARK_ALLOW_RECURSION | Allows recursive functions in checks scripts | false |
| PMM_NICER_API | Enables nicer API with default/zero values in response. | false |
| PMM_DEV_VERSION_SERVICE_URL | Sets versions service URL | https://check.percona.com/versions/v1 |
| PMM_DEV_ADVISOR_CHECKS_FILE | Specifies path to local checks file and disables downlading checks files from Percona Platform | none |
| PMM_ADVISORS_CHECKS_DISABLE_START_DELAY | Disables checks service startup delay | false |
| PMM_DEV_TELEMETRY_INTERVAL | Sets telemetry reporting interval | 24h |
| PMM_DEV_TELEMETRY_DISABLE_SEND | Disables sending of telemetry data to SaaS. This param doesn't affect telemetry data gathering from the datasources | false |
| PMM_DEV_TELEMETRY_FILE | Sets path for telemetry config file | |
| PMM_DEV_TELEMETRY_DISABLE_START_DELAY | Disable the default telemetry execution start delay, so that telemetry gathering is run immediately upon system | false |
| PMM_DEV_TELEMETRY_RETRY_BACKOFF | Sets telemetry reporting retry backoff time | 1h |
| PMM_DEV_PERCONA_PLATFORM_ADDRESS | Sets Percona Platform address | https://check.percona.com |
| PMM_DEV_PERCONA_PLATFORM_INSECURE | Allows insecure TLS connections to Percona Platform | false |
| PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY | Sets Percona Platform public key (Minisign) | set of keys embedded into managed binary |

## Add instances for monitoring

Expand Down
7 changes: 3 additions & 4 deletions managed/utils/envvars/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
envPlatformInsecure = "PMM_DEV_PERCONA_PLATFORM_INSECURE"
envPlatformPublicKey = "PMM_DEV_PERCONA_PLATFORM_PUBLIC_KEY"
evnInterfaceToBind = "PMM_INTERFACE_TO_BIND"
envEnableAccessControl = "PMM_ENABLE_RBAC"
envEnableAccessControl = "PMM_ENABLE_ACCESS_CONTROL"
envPlatformAPITimeout = "PMM_PERCONA_PLATFORM_API_TIMEOUT"
defaultPlatformAPITimeout = 30 * time.Second
// ENVvmAgentPrefix is the prefix for environment variables related to the VM agent.
Expand All @@ -62,7 +62,7 @@ func (e InvalidDurationError) Error() string { return string(e) }
// - PMM_METRICS_RESOLUTION, PMM_METRICS_RESOLUTION_MR, PMM_METRICS_RESOLUTION_HR, PMM_METRICS_RESOLUTION_LR are durations of metrics resolution;
// - PMM_DATA_RETENTION is the duration of how long keep time-series data in ClickHouse;
// - PMM_ENABLE_AZURE_DISCOVER enables Azure Discover;
// - PMM_ENABLE_RBAC enables Access control;
// - PMM_ENABLE_ACCESS_CONTROL enables Access control;
// - the environment variables prefixed with GF_ passed as related to Grafana.
// - the environment variables relating to proxies
// - the environment variable set by podman
Expand Down Expand Up @@ -217,14 +217,13 @@ func ParseEnvVars(envs []string) (*models.ChangeSettingsParams, []error, []strin

if strings.HasPrefix(k, "PERCONA_") {
warns = append(warns, "PERCONA_* env variables IS NOT SUPPORTED, please use PMM_* env variables, for details please check our documentation")
continue
}

if !strings.HasPrefix(k, "PMM_TEST_PERCONA") {
warns = append(warns, fmt.Sprintf("unknown environment variable %q", env))
continue
}

warns = append(warns, fmt.Sprintf("environment variable %q IS NOT SUPPORTED and WILL BE REMOVED IN THE FUTURE", k))
}

if err != nil {
Expand Down

0 comments on commit d52729d

Please sign in to comment.