Configuration parameters

WEM and the Collector are each configured through a dedicated configuration file on their respective hosts. The parameters below cover all supported options, their defaults, and their descriptions.

WEM parameters

Configure these parameters in /etc/wem/wem.conf on the WEM host.

Target cluster

ParameterDefaultRequiredDescription
WHPG_HOSTlocalhostYesHostname of the WarehousePG coordinator.
WHPG_PORT5432YesPort for the WarehousePG coordinator.
WHPG_DATABASEwemYesDatabase on the WHPG cluster to connect to. Any database is valid, but WHPG_USER must be a superuser.
WHPG_USERgpadminYesWarehousePG superuser for monitoring.
WHPG_PASSWORDYesPassword for WHPG_USER.

Observability endpoints

ParameterDefaultRequiredDescription
PROMETHEUS_URLNoURL of the Prometheus server for metrics. For example, http://prometheus.hostname:9090.
LOKI_URLNoURL of the Loki server for log aggregation. For example, http://loki.hostname:3100.
ALERTMANAGER_URLNoURL of the Alertmanager endpoint for alert routing and notifications. For example, http://prometheus.hostname:9093. Required to enable the Alerts panel.

Application state

By default, WEM stores its internal state in the database defined by WHPG_DATABASE. Use these parameters to point WEM at a dedicated database instead.

ParameterDefaultRequiredDescription
WEM_HOSTWHPG_HOSTNoHostname of the WEM application state database.
WEM_PORTWHPG_PORTNoPort for the WEM application state database.
WEM_DATABASEwemNoDatabase name for WEM application state.
WEM_USERWHPG_USERNoUser for the WEM application state database.
WEM_PASSWORDNoPassword for WEM_USER.

Web server

ParameterDefaultRequiredDescription
PORT8080NoHTTP port on which the WEM web portal listens.

Session security

ParameterDefaultRequiredDescription
WEM_COOKIE_SECRETYes32-byte secret key for session cookies. Generate with openssl rand -base64 32. WEM returns an error at startup if this is unset.
WEM_INSECURE_COOKIESNoSet to 1 to allow cookies over HTTP. Required when WEM is not served over HTTPS.

Admin credentials

ParameterDefaultRequiredDescription
WEM_ADMIN_PASSWORDAuto-generatedNoInitial admin password. Auto-generated at install if empty. Only used during first-time setup if the dashboard_users table doesn't yet exist.
WEM_ADMIN_PASSWORD_FILENoPath to a file containing the admin password. Use instead of WEM_ADMIN_PASSWORD for automated deployments.

AI Assistant

ParameterDefaultRequiredDescription
ANTHROPIC_API_KEYNoAPI key for the integrated AI Assistant. Requires an active Anthropic account. The assistant is disabled when this parameter is unset.

Exporter

ParameterDefaultRequiredDescription
WEM_EXPORTER_LOG_LEVELwarnNoVerbosity of Exporter logs. Accepts debug, info, warn, or error.
WEM_EXPORTER_REMOTE_WRITE_ENABLEDtrueNoControls whether WEM actively pushes SQL exporter metrics to Prometheus via remote write. Set to false to use pull-only mode or when PROMETHEUS_URL is not set. The /prom/metrics endpoint remains available regardless.
WEM_EXPORTER_REMOTE_WRITE_INTERVAL15sNoFrequency for pushing metrics to Prometheus. For example, 15s, 1m, 5m.
WEM_EXPORTER_REMOTE_WRITE_TIMEOUT30sNoMaximum time allowed for a remote write push. For example, 30s, 1m, 2m.
LONG_RUNNING_THRESHOLD10mNoDuration after which a query is flagged as long-running in the Connection & Query Metrics section on the System Metrics page. Can also be set from the WEM interface.

PXF and service identity

ParameterDefaultRequiredDescription
WHPG_OS_USERgpadminNoOS user that pxf cluster commands run as. PXF requires WHPG and PXF to share the same OS account. Don't edit this parameter manually. It's set automatically by wem configure-user.
WHPG_PXF_BASENoPXF_BASE directory. WEM reads the value from gpadmin's shell environment at install time. Set this parameter explicitly if wem doctor reports a PXF_BASE mismatch.
WHPG_PXF_BINNoPath to the pxf binary. WEM searches common install paths at install time. Set this parameter explicitly if WEM didn't detect your PXF installation.
WHPG_PXF_OP_TIMEOUT_SECONDS60NoPer-operation timeout in seconds for pxf cluster start and pxf cluster stop. Raise on large clusters, slow networks, or slow JVM start-up. Valid range: 30–600.
WHPG_ALLOW_ROOTNoSet to 1 to allow the WEM service to run as root. By default, WEM refuses to start as root. WEM logs a warning on every restart when this is set.

Remote write receiver

When enabled, WEM accepts inbound time-series data from Grafana Alloy or any Prometheus-compatible remote write client via POST /write, and exposes received metrics at /prom/metrics alongside its own cluster metrics.

ParameterDefaultRequiredDescription
WEM_REMOTE_WRITE_RECEIVER_ENABLEDfalseYes (to enable)Master switch for the receiver. When false, no /write endpoint is registered and no additional port is opened.
WEM_REMOTE_WRITE_RECEIVER_PORT9091NoPort on which WEM listens for POST /write requests. When different from PORT, WEM opens a dedicated HTTP listener — only /write and /api/v1/status/buildinfo are available there. When set to the same value as PORT, the /write route is registered on the main web server instead.
WEM_REMOTE_WRITE_RECEIVER_TTL5mNoHow long WEM retains a received time series in memory after its last sample. Set to at least twice your Alloy remote_write interval. With Alloy's default 60-second interval, 2m is the minimum safe value. Accepts s, m, and h suffixes.
WEM_REMOTE_WRITE_RECEIVER_TOKENRecommendedSensitive. Bearer token that POST /write requests must present in the Authorization: Bearer <token> header. When empty, any client that can reach the port can push metrics and WEM logs a warning. When set, requests without a valid token are rejected with HTTP 401. Generate with openssl rand -base64 32. Can also be passed as the --remote-write-token CLI flag.

Collector parameters

Configure these parameters in /var/lib/whpg-observability-collector/collector.conf on the WarehousePG coordinator.

ParameterDefaultRequiredDescription
WHPG_OBS_DSNYesWarehousePG cluster connection string. For example, host=coordinator-host port=5432 dbname=postgres user=gpadmin sslmode=disable. The user must be a superuser.
PROMETHEUS_ENDPOINTYesPrometheus remote write URL for host metrics. For example, http://prometheus.hostname:9090/api/v1/write.
LOKI_ENDPOINTYesLoki push API URL for log aggregation. For example, http://loki.hostname:3100/loki/api/v1/push.
PROMETHEUS_BEARER_TOKENNoBearer token for authenticating remote write requests to Prometheus. Required if your Prometheus instance enforces authentication.
LOKI_BEARER_TOKENNoBearer token for authenticating log push requests to Loki. Required if your Loki instance enforces authentication.

Could this page be better? Report a problem or suggest an addition!