Removed Nanoseconds cast as requested by @banks

This commit is contained in:
Pierre Souchay 2018-04-24 16:30:10 +02:00
parent 9ddf7af82d
commit 956b6213dc
1 changed files with 1 additions and 1 deletions

View File

@ -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