|
|
@ -187,6 +187,11 @@ func (api *API) queryRange(r *http.Request) (interface{}, *apiError) { |
|
|
|
return nil, &apiError{errorBadData, err} |
|
|
|
return nil, &apiError{errorBadData, err} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if step <= 0 { |
|
|
|
|
|
|
|
err := errors.New("zero or negative query resolution step widths are not accepted. Try a positive integer") |
|
|
|
|
|
|
|
return nil, &apiError{errorBadData, err} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// For safety, limit the number of returned points per timeseries.
|
|
|
|
// For safety, limit the number of returned points per timeseries.
|
|
|
|
// This is sufficient for 60s resolution for a week or 1h resolution for a year.
|
|
|
|
// This is sufficient for 60s resolution for a week or 1h resolution for a year.
|
|
|
|
if end.Sub(start)/step > 11000 { |
|
|
|
if end.Sub(start)/step > 11000 { |
|
|
|