From aada5ded85087554a878bce020791cf5bfadcbc2 Mon Sep 17 00:00:00 2001 From: Conor Hennessy Date: Tue, 15 Oct 2013 12:36:25 +0200 Subject: [PATCH] Replace some uses of obsolete `/metrics.json` with `/metrics` (haven't touched test files yet). Change-Id: I48c7c0cf27a39d596627a06cbb4f5913fb3da13c --- config/config.proto | 2 +- config/generated/config.pb.go | 4 ++-- documentation/examples/prometheus.conf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.proto b/config/config.proto index ae14a02a53..06660d85f3 100644 --- a/config/config.proto +++ b/config/config.proto @@ -72,7 +72,7 @@ message JobConfig { // used for a job. repeated TargetGroup target_group = 5; // The HTTP resource path to fetch metrics from on targets. - optional string metrics_path = 6 [default = "/metrics.json"]; + optional string metrics_path = 6 [default = "/metrics"]; } // The top-level Prometheus configuration. diff --git a/config/generated/config.pb.go b/config/generated/config.pb.go index cab49f37b8..58cbe36da5 100644 --- a/config/generated/config.pb.go +++ b/config/generated/config.pb.go @@ -158,7 +158,7 @@ type JobConfig struct { // used for a job. TargetGroup []*TargetGroup `protobuf:"bytes,5,rep,name=target_group" json:"target_group,omitempty"` // The HTTP resource path to fetch metrics from on targets. - MetricsPath *string `protobuf:"bytes,6,opt,name=metrics_path,def=/metrics.json" json:"metrics_path,omitempty"` + MetricsPath *string `protobuf:"bytes,6,opt,name=metrics_path,def=/metrics" json:"metrics_path,omitempty"` XXX_unrecognized []byte `json:"-"` } @@ -168,7 +168,7 @@ func (*JobConfig) ProtoMessage() {} const Default_JobConfig_ScrapeTimeout string = "10s" const Default_JobConfig_SdRefreshInterval string = "30s" -const Default_JobConfig_MetricsPath string = "/metrics.json" +const Default_JobConfig_MetricsPath string = "/metrics" func (m *JobConfig) GetName() string { if m != nil && m.Name != nil { diff --git a/documentation/examples/prometheus.conf b/documentation/examples/prometheus.conf index f862519198..3bbaad72c7 100644 --- a/documentation/examples/prometheus.conf +++ b/documentation/examples/prometheus.conf @@ -25,6 +25,6 @@ job: { # Let's define a group of targets to scrape for this job. In this case, only one. target_group: { # These endpoints are scraped via HTTP. - target: "http://localhost:9090/metrics.json" + target: "http://localhost:9090/metrics" } }