Installing WHPG Exporter
Install the Warehouse (WHPG) Exporter on your designated host, which can reside inside your WHPG cluster (on the coordinator or standby coordinator) or on a separate host. It must be able to connect to the WHPG cluster (i.e., if you have the WHPG Cluster behind a firewall, then the Exporter needs the ability to connect to it).
Download and install WHPG Exporter
Download the package 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-exporter
Install WHPG Exporter on the designated host:
sudo dnf install -y edb-whpg-observability-exporter
sudo yum install -y edb-whpg-observability-exporter
Configure WHPG Exporter
Edit the file /etc/sysconfig/whpg-observability-exporter and save your changes.
# Database Connection String (DSN) for the Warehouse PG instance to monitor. WHPG_OBS_DSN="host=localhost port=<WHPG_PORT> dbname=database_name user=postgres password=postgres sslmode=disable" # Exporter Listening Port for the endpoints eg - queries WHPG_OBS_PORT=9187 # Application Logging Level (e.g., debug, info, warn, error). WHPG_OBS_LOG_LEVEL=warn # Remote Write Endpoint URL for sending metrics to Prometheus database. WHPG_OBS_REMOTE_WRITE_URL="http://localhost:9090/api/v1/write" # Remote Write Frequency—how often to send metrics to the remote storage. WHPG_OBS_REMOTE_WRITE_INTERVAL=15s # Remote Write Timeout for the connection/request when sending metrics. WHPG_OBS_REMOTE_WRITE_TIMEOUT=30s
Ensure that you configure at least the following parameters:
WHPG_OBS_DSN: Your WHPG cluster connection details. The database must be a database with the WHPG Extension installed, and the user must hold the superuser role. You may skip thepasswordfield and use a.pgpassfile instead.WHPG_OBS_PORT: The port the Exporter listens for Grafana requests. Default is 9187. Make sure you expose this port in a way that Grafana can access it.WHPG_OBS_REMOTE_WRITE_URL: Your configured Prometheus remote write endpoint for historic data.
Start WHPG Exporter service
Run the following command to start the Exporter service:
sudo systemctl start whpg-observability-exporterThe service runs as the dedicated user whpg-exporter and creates its log files under /var/log/whpg-observability-exporter/. You can manage this service using systemctl commands. For example:
Check status:
sudo systemctl status whpg-observability-exporter
Enable on boot:
sudo systemctl enable whpg-observability-exporter
Verify the installation
Access the REST endpoint from your browser to confirm the Exporter is running: http://<WHPG_EXPORTER_HOST>:<WHPG_OBS_PROM_PORT>/health.
You should see the live SQL metrics that will be consumed by Prometheus and visualized in Grafana.
Could this page be better? Report a problem or suggest an addition!