Install the WarehousePG (WHPG) Collector on your WHPG cluster coordinator.
Downloading and installing WHPG Collector
On the coordinator, download the packages from the EDB repository:
export EDB_SUBSCRIPTION_TOKEN=<your-token> export EDB_REPO=gpsupp curl -1sSLf "https://downloads.enterprisedb.com/$EDB_SUBSCRIPTION_TOKEN/$EDB_REPO/setup.rpm.sh" | sudo -E bash sudo dnf download edb-whpg-observability-collector
On the coordinator, create a file
all_hosts, which lists all hosts in the WHPG cluster. For example:cdw scdw sdw1 sdw2 sdw3
From the coordinator, copy the Collector package to all hosts in the WHPG cluster:
gpsync -f all_hosts edb-whpg-observability-collector*.rpm =:/tmp/
gpscp -f all_hosts edb-whpg-observability-collector*.rpm =:/tmp/
Note
SSH keys must be configured in both directions (from the coordinator to each segment host, and from each segment host back to the coordinator) for the copy to succeed. If the command hangs, verify that passwordless SSH is configured on all segment hosts by running
ssh sdw1 'ssh $(hostname) echo ok'from the coordinator.Install the package on all hosts:
gpssh -f all_hosts -u gpadmin -e "sudo dnf install -y /tmp/edb-whpg-observability-collector*.rpm"
Configuring WEM Collector
Once the Collector package is installed, edit the file /var/lib/whpg-observability-collector/collector.conf on the coordinator and configure the following parameters. For the complete parameter reference, see Configuration reference.
WHPG_OBS_DSN: Specify your WHPG cluster connection details. For example:WHPG_OBS_DSN="host=whpg-coordinator-host port=5432 dbname=postgres user=gpadmin password=postgres sslmode=disable"
!!! Note You can specify any database on your WHPG cluster. However, the user must hold the superuser role.
LOKI_ENDPOINT: Point to your configured Loki API endpoint for log aggregation. For example:LOKI_ENDPOINT="http://loki.hostname:3100/loki/api/v1/push"
PROMETHEUS_ENDPOINT: Point to your configured Prometheus API endpoint for host-level metrics via remote write. For example:PROMETHEUS_ENDPOINT="http://prometheus.hostname:9090/api/v1/write"
PROMETHEUS_BEARER_TOKEN(optional): Bearer token to authenticate the Collector's remote write requests to Prometheus. Set this if your Prometheus instance requires authentication. For example:PROMETHEUS_BEARER_TOKEN="your-prometheus-token"
LOKI_BEARER_TOKEN(optional): Bearer token to authenticate the Collector's log push requests to Loki. Set this if your Loki instance requires authentication. For example:LOKI_BEARER_TOKEN="your-loki-token"
Starting the Collector service
On the coordinator, run the following commands to deploy the configuration and start the service on every host in the WHPG cluster:
cd /var/lib/whpg-observability-collector
./deploy-observability The Collector service now runs in the background on each host as the alloy service. You can manage this service using systemctl commands. For example:
To check the service status:
sudo systemctl status alloyTo enable on boot:
sudo systemctl enable alloy
Verifying Collector is sending data
After starting the service, confirm that metrics are reaching Prometheus by querying the API directly from the coordinator host. Replace <prometheus-host> with the hostname configured in PROMETHEUS_ENDPOINT:
curl 'http://<prometheus-host>:9090/api/v1/query?query=warehousepg_observability_node_cpu_seconds_total'
A successful response contains a non-empty result array. If the result is empty, see Charts are empty despite Prometheus being configured for diagnostic steps.