From d88cce2cfcc385a8d33cc4dd3d4bd585dd8e94e9 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 1 Oct 2025 11:04:30 +0000 Subject: [PATCH] fix: use AVERAGE instead of average for PBS RRD API cf parameter Fixes #483 - PBS syslog was being flooded with 400 Bad Request errors because the cf parameter value 'average' is not in the valid enumeration. Changed to 'AVERAGE' (all caps) per PBS API specification. --- pkg/pbs/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/pbs/client.go b/pkg/pbs/client.go index 317fbb6ac..c926f011d 100644 --- a/pkg/pbs/client.go +++ b/pkg/pbs/client.go @@ -475,7 +475,8 @@ func (c *Client) GetDatastores(ctx context.Context) ([]Datastore, error) { for _, ds := range datastoreList.Data { // Try to get RRD data first which has more statistics // RRD requires cf (consolidation function) and timeframe parameters - rrdPath := fmt.Sprintf("/admin/datastore/%s/rrd?cf=average&timeframe=hour", ds.Store) + // Valid cf values: AVERAGE, MAXIMUM, MINIMUM (all caps per PBS API spec) + rrdPath := fmt.Sprintf("/admin/datastore/%s/rrd?cf=AVERAGE&timeframe=hour", ds.Store) rrdResp, err := c.get(ctx, rrdPath) var dedupFactor float64 if err == nil {