Installing WHPG Extension and WHPG Collector

Install WarehousePG (WHPG) Extension and Collector on your WHPG cluster coordinator.

Download and install WHPG Extension and WHPG Collector

  1. 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<whpg_major_version>-observability-suite

Where <whpg_major_version> is your WHPG version (6 or 7).

  1. Create a file all_hosts on your WHPG coordinator, which lists all hosts in the WHPG cluster. For example:

    cdw
    scdw
    sdw1
    sdw2
    sdw3
  2. From the coordinator, use the gpssh utility to install the packages from the coordinator onto every other host in the cluster:

Create the WHPG Extension

Connect to a database on your WHPG cluster. We recommend that you create a separate database for WHPG Observability, but you must also install the Extension in every database that you require metrics for.

CREATE EXTENSION whpg_observability;

You should now see the observability schema created in the database.

Configure the WHPG Collector

On the coordinator, edit the file /var/lib/whpg-observability-collector/observability.conf to include the following configuration:

[settings] # Do not change this
# Please update below details before running /var/lib/whpg-observability-collector/deploy-observability
# Connection url for the WHPG cluster to fetch segment hostnames, data dirs.
#WHPG_OBS_DSN="host=localhost port=5432 dbname=postgres user=gpadmin password=postgres sslmode=disable"

# The HTTP API endpoint for sending logs to Loki (Log Aggregation).
#LOKI_ENDPOINT="http://host.docker.internal:3100/loki/api/v1/push"

# The HTTP API endpoint for sending custom metrics via Remote Write to Prometheus.
#PROMETHEUS_ENDPOINT="http://host.docker.internal:9090/api/v1/write"

Ensure that you configure 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. This parameter doesn't support .pgpass for the Collector.
  • LOKI_ENDPOINT: Your configured host name and port number for the Loki endpoint for log files.
  • PROMETHEUS_ENDPOINT: Your configured host name port number for the Prometheus endpoint for host-level metrics.

Start the WHPG 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 WHPG Collector now runs in the background on each host as the alloy service. You can manage this service using systemctl commands. For example:

Check status:

sudo systemctl status alloy

Enable on boot:

sudo systemctl enable alloy

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