Removed Nanoseconds cast as requested by @banks
This commit is contained in:
parent
9ddf7af82d
commit
956b6213dc
|
@ -97,7 +97,7 @@ func (s *HTTPServer) AgentMetrics(resp http.ResponseWriter, req *http.Request) (
|
|||
return nil, acl.ErrPermissionDenied
|
||||
}
|
||||
if enablePrometheusOutput(req) {
|
||||
if s.agent.config.TelemetryPrometheusRetentionTime.Nanoseconds() < 1 {
|
||||
if s.agent.config.TelemetryPrometheusRetentionTime < 1 {
|
||||
resp.WriteHeader(http.StatusUnsupportedMediaType)
|
||||
fmt.Fprint(resp, "Prometheus is not enable since its retention time is not positive")
|
||||
return nil, nil
|
||||
|
|
Loading…
Reference in New Issue