mirror of https://github.com/status-im/consul.git
Removed Nanoseconds cast as requested by @banks
This commit is contained in:
parent
62a68a008d
commit
26388503e0
|
@ -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