mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 22:12:23 +00:00
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.
This commit is contained in:
+2
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user