gpdb_table_age_percent Metric Missing in Greenplum Exporter
search cancel

gpdb_table_age_percent Metric Missing in Greenplum Exporter

book

Article ID: 435933

calendar_today

Updated On:

Products

VMware Tanzu Data Suite VMware Tanzu Greenplum VMware Tanzu Greenplum / Gemfire VMware Tanzu Data Suite VMware Tanzu Data VMware Tanzu Data Intelligence

Issue/Introduction

When using the Greenplum Exporter with Prometheus and Grafana, the metric `gpdb_table_age_percent` returns no results or is missing from the `/table_metrics` endpoint, even though other table metrics are collected correctly.

Environment

- Greenplum Database (GPDB) 6.x
- Greenplum Command Center (GPCC) 6.16.x
- Greenplum Exporter enabled

Cause

The `gpdb_table_age_percent` metric tracks the Transaction ID (XID) age of a table relative to the `xid_warn_limit` Global Upper Configuration (GUC). By default, Greenplum Command Center (GPCC) only populates this data for tables that have reached a specific age threshold to avoid overhead from tracking "young" tables.

This threshold is controlled by the `age_ratio` parameter in the GPCC configuration. The default value is 0.7 (70%). If no tables in the database have an XID age exceeding 70% of the warning limit, the metric will remain empty

Resolution

To verify the metric is working or to capture data for younger tables, try to adjust the recommendation settings in GPCC.

Step 1: Modify GPCC Configuration

1. Log in to the Greenplum master/coordinator host.
2. Navigate to your `gpmetrics` directory and open `gpcc.conf` for editing, usually it should be <gpadmin home dir>/gpmetrics/gpcc.conf
3. Add or update the `[recommendations]` section with a lower `age_ratio` value (e.g., 0.1 for 10%, or much more lower if you don't have any old table)

[recommendations]
age_ratio = <a small value>

Step 2: Restart GPCC and Run Scan

1. Restart the GPCC instances to apply the new configuration.
2. Manually trigger a new recommendation scan to populate the metrics. You can run it via the following cli:

gpcc-util recommendation start

Step 3: Verify Metrics Collection

1. Check if the data is present in the `gpperfmon` database.

SELECT * FROM gpmetrics.gpcc_table_info WHERE age_percent IS NOT NULL;

2. Query the exporter endpoint directly to confirm the metric is being served to Prometheus.

Review this command before running it.

curl -H "Authorization: Bearer <your_token>" http://<gpcc_host>:<perf port>/table_metrics | grep gpdb_table_age_percent