diff --git a/pkg/scalers/graphite_scaler.go b/pkg/scalers/graphite_scaler.go index 854fa4b9483..29506b7aecf 100644 --- a/pkg/scalers/graphite_scaler.go +++ b/pkg/scalers/graphite_scaler.go @@ -194,7 +194,8 @@ func (s *graphiteScaler) ExecuteGrapQuery(ctx context.Context) (float64, error) } // https://graphite-api.readthedocs.io/en/latest/api.html#json - datapoint := result[0].Datapoints[0][0] + latestDatapoint := len(result[0].Datapoints) - 1 + datapoint := result[0].Datapoints[latestDatapoint][0] return datapoint, nil }