mirror of https://github.com/status-im/consul.git
Fix prometheus error message (#4745)
This commit is contained in:
parent
d3b6750c3b
commit
6b7f03911e
|
@ -108,7 +108,7 @@ func (s *HTTPServer) AgentMetrics(resp http.ResponseWriter, req *http.Request) (
|
||||||
if enablePrometheusOutput(req) {
|
if enablePrometheusOutput(req) {
|
||||||
if s.agent.config.Telemetry.PrometheusRetentionTime < 1 {
|
if s.agent.config.Telemetry.PrometheusRetentionTime < 1 {
|
||||||
resp.WriteHeader(http.StatusUnsupportedMediaType)
|
resp.WriteHeader(http.StatusUnsupportedMediaType)
|
||||||
fmt.Fprint(resp, "Prometheus is not enable since its retention time is not positive")
|
fmt.Fprint(resp, "Prometheus is not enabled since its retention time is not positive")
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
handlerOptions := promhttp.HandlerOpts{
|
handlerOptions := promhttp.HandlerOpts{
|
||||||
|
|
Loading…
Reference in New Issue