From 956b6213dc37adf5447644c74797e1f861fc812d Mon Sep 17 00:00:00 2001
From: Pierre Souchay
Date: Tue, 24 Apr 2018 16:30:10 +0200
Subject: [PATCH] Removed Nanoseconds cast as requested by @banks
---
agent/agent_endpoint.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agent/agent_endpoint.go b/agent/agent_endpoint.go
index deb88fcc5..bd9181ab3 100644
--- a/agent/agent_endpoint.go
+++ b/agent/agent_endpoint.go
@@ -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