This commit is contained in:
@@ -113,6 +113,17 @@ The import command:
|
||||
- Auto-creates runtime tables (hourly/daily/monthly snapshot tables and cache tables) when needed.
|
||||
- Replaces existing data in imported Postgres tables during the run.
|
||||
|
||||
If you want a one-time canonical aggregation benchmark (Go vs SQL cores) and exit, use:
|
||||
|
||||
```shell
|
||||
vctp -settings /path/to/vctp.yml -benchmark-aggregations -benchmark-runs 3
|
||||
```
|
||||
|
||||
The benchmark command:
|
||||
- Uses canonical cache sources (`vm_hourly_stats` for daily, `vm_daily_rollup` for monthly).
|
||||
- Runs Go and SQL aggregation cores for the latest available daily/monthly windows.
|
||||
- Writes results to startup logs and exits without changing scheduled defaults.
|
||||
|
||||
## Database Configuration
|
||||
By default the app uses SQLite and creates/opens `db.sqlite3`.
|
||||
|
||||
@@ -205,8 +216,12 @@ Hourly and daily snapshot table retention can be configured in the settings file
|
||||
## Runtime Environment Flags
|
||||
These optional flags are read from the process environment (for example via `/etc/default/vctp`):
|
||||
|
||||
- `DAILY_AGG_GO`: set to `1` (default in `src/vctp.default`) to use the Go daily aggregation path.
|
||||
- `MONTHLY_AGG_GO`: set to `1` (default in `src/vctp.default`) to use the Go monthly aggregation path.
|
||||
- `DAILY_AGG_GO`: set to `1` (default in `src/vctp.default`) to force Go for manual daily runs.
|
||||
- `DAILY_AGG_SQL`: set to `1` to force legacy SQL fallback for manual daily runs.
|
||||
- `MONTHLY_AGG_GO`: set to `1` (default in `src/vctp.default`) to force Go for manual monthly runs.
|
||||
- `MONTHLY_AGG_SQL`: set to `1` to force legacy SQL fallback for manual monthly runs.
|
||||
|
||||
Scheduled aggregation engine selection is controlled by YAML (`settings.scheduled_aggregation_engine`), not these env vars.
|
||||
|
||||
## Authentication and Authorization
|
||||
Authentication uses LDAP bind + JWT bearer tokens.
|
||||
@@ -246,6 +261,16 @@ Debug endpoints:
|
||||
- `/debug/pprof/*` handlers are only registered when `settings.enable_pprof: true`.
|
||||
- When enabled, they require an authenticated `admin` token.
|
||||
|
||||
## Airgapped Static Assets
|
||||
vCTP is safe for airgapped operation without internet/CDN dependencies for UI/docs assets:
|
||||
|
||||
- CSS, JS, and favicon assets are bundled into the binary via Go `embed` and served from local routes (`/assets/*`, `/favicon*`).
|
||||
- Swagger UI is vendored under `server/router/swagger-ui-dist` and served locally from `/swagger/*`.
|
||||
- Swagger spec is served locally from `/swagger.json` (`validatorUrl` is disabled in the initializer).
|
||||
- Static responses include cache headers. In release builds, versioned assets are served with long-lived cache headers and immutable caching.
|
||||
|
||||
This means runtime access to external asset hosts is not required.
|
||||
|
||||
## Credential Encryption Lifecycle
|
||||
At startup, vCTP resolves `settings.vcenter_password` using this order:
|
||||
|
||||
@@ -343,6 +368,8 @@ Snapshots:
|
||||
- `title_cell` (optional): explicit title cell; if omitted, derived from `pivot_range`
|
||||
- `settings.hourly_snapshot_retry_seconds`: interval for retrying failed hourly snapshots (default: 300 seconds)
|
||||
- `settings.hourly_snapshot_max_retries`: maximum retry attempts per vCenter snapshot (default: 3)
|
||||
- `settings.postgres_vm_hourly_partitioning_enabled`: Postgres-only toggle to migrate/manage `vm_hourly_stats` as monthly range partitions (default: `false`)
|
||||
- `settings.scheduled_aggregation_engine`: scheduled daily/monthly engine (`go` default, `sql` for canonical SQL rollout)
|
||||
|
||||
Filters/chargeback:
|
||||
- `settings.tenants_to_filter`: list of tenant name patterns to exclude
|
||||
|
||||
Reference in New Issue
Block a user