diff --git a/CHANGELOG.md b/CHANGELOG.md index 9295e9a82..5c9b42026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ +## 1.8.0 / 2017-10-06 + +* [CHANGE] Rule links link to the _Console_ tab rather than the _Graph_ tab to + not trigger expensive range queries by default. +* [FEATURE] Ability to act as a remote read endpoint for other Prometheus + servers. +* [FEATURE] K8s SD: Support discovery of ingresses. +* [FEATURE] Consul SD: Support for node metadata. +* [FEATURE] Openstack SD: Support discovery of hypervisors. +* [FEATURE] Expose current Prometheus config via `/status/config`. +* [FEATURE] Allow to collapse jobs on `/targets` page. +* [FEATURE] Add `/-/healthy` and `/-/ready` endpoints. +* [FEATURE] Add color scheme support to console templates. +* [ENHANCEMENT] Remote storage connections use HTTP keep-alive. +* [ENHANCEMENT] Improved logging about remote storage. +* [ENHANCEMENT] Relaxed URL validation. +* [ENHANCEMENT] Openstack SD: Handle instances without IP. +* [ENHANCEMENT] Make remote storage queue manager configurable. +* [ENHANCEMENT] Validate metrics returned from remote read. +* [ENHANCEMENT] EC2 SD: Set a default region. +* [ENHANCEMENT] Changed help link to `https://prometheus.io/docs`. +* [BUGFIX] Fix floating-point precision issue in `deriv` function. +* [BUGFIX] Fix pprof endpoints when -web.route-prefix or -web.external-url is + used. +* [BUGFIX] Fix handling of `null` target groups in file-based SD. +* [BUGFIX] Set the sample timestamp in date-related PromQL functions. +* [BUGFIX] Apply path prefix to redirect from deprecated graph URL. +* [BUGFIX] Fixed tests on MS Windows. +* [BUGFIX] Check for invalid UTF-8 in label values after relabeling. + ## v2.0.0-rc.0 / 2017-10-05 This release includes numerous changes to the new storage layer. The main changes are: diff --git a/documentation/examples/remote_storage/remote_storage_adapter/graphite/client.go b/documentation/examples/remote_storage/remote_storage_adapter/graphite/client.go index b6a88a626..edd4546ee 100644 --- a/documentation/examples/remote_storage/remote_storage_adapter/graphite/client.go +++ b/documentation/examples/remote_storage/remote_storage_adapter/graphite/client.go @@ -93,7 +93,7 @@ func (c *Client) Write(samples model.Samples) error { t := float64(s.Timestamp.UnixNano()) / 1e9 v := float64(s.Value) if math.IsNaN(v) || math.IsInf(v, 0) { - level.Warn(c.logger).Log("msg", "cannot send value to Graphite, skipping sample", "value", v, "sample", s) + level.Debug(c.logger).Log("msg", "cannot send value to Graphite, skipping sample", "value", v, "sample", s) continue } fmt.Fprintf(&buf, "%s %f %f\n", k, v, t) diff --git a/documentation/examples/remote_storage/remote_storage_adapter/opentsdb/client.go b/documentation/examples/remote_storage/remote_storage_adapter/opentsdb/client.go index f2ffa1241..a79821d40 100644 --- a/documentation/examples/remote_storage/remote_storage_adapter/opentsdb/client.go +++ b/documentation/examples/remote_storage/remote_storage_adapter/opentsdb/client.go @@ -79,7 +79,7 @@ func (c *Client) Write(samples model.Samples) error { for _, s := range samples { v := float64(s.Value) if math.IsNaN(v) || math.IsInf(v, 0) { - level.Warn(c.logger).Log("msg", "cannot send value to OpenTSDB, skipping sample", "value", v, "sample", s) + level.Debug(c.logger).Log("msg", "cannot send value to OpenTSDB, skipping sample", "value", v, "sample", s) continue } metric := TagValue(s.Metric[model.MetricNameLabel]) diff --git a/web/api/v1/api.go b/web/api/v1/api.go index 3592217f2..b179dbdde 100644 --- a/web/api/v1/api.go +++ b/web/api/v1/api.go @@ -106,10 +106,18 @@ type API struct { now func() time.Time config func() config.Config + ready func(http.HandlerFunc) http.HandlerFunc } // NewAPI returns an initialized API type. -func NewAPI(qe *promql.Engine, q promql.Queryable, tr targetRetriever, ar alertmanagerRetriever, configFunc func() config.Config) *API { +func NewAPI( + qe *promql.Engine, + q promql.Queryable, + tr targetRetriever, + ar alertmanagerRetriever, + configFunc func() config.Config, + readyFunc func(http.HandlerFunc) http.HandlerFunc, +) *API { return &API{ QueryEngine: qe, Queryable: q, @@ -117,6 +125,7 @@ func NewAPI(qe *promql.Engine, q promql.Queryable, tr targetRetriever, ar alertm alertmanagerRetriever: ar, now: time.Now, config: configFunc, + ready: readyFunc, } } @@ -133,9 +142,9 @@ func (api *API) Register(r *route.Router) { w.WriteHeader(http.StatusNoContent) } }) - return prometheus.InstrumentHandler(name, httputil.CompressionHandler{ + return api.ready(prometheus.InstrumentHandler(name, httputil.CompressionHandler{ Handler: hf, - }) + })) } r.Options("/*path", instr("options", api.options)) diff --git a/web/api/v1/api_test.go b/web/api/v1/api_test.go index 662accf7f..93a278c36 100644 --- a/web/api/v1/api_test.go +++ b/web/api/v1/api_test.go @@ -104,6 +104,7 @@ func TestEndpoints(t *testing.T) { alertmanagerRetriever: ar, now: func() time.Time { return now }, config: func() config.Config { return samplePrometheusCfg }, + ready: func(f http.HandlerFunc) http.HandlerFunc { return f }, } start := time.Unix(0, 0) @@ -658,7 +659,7 @@ func TestParseDuration(t *testing.T) { func TestOptionsMethod(t *testing.T) { r := route.New() - api := &API{} + api := &API{ready: func(f http.HandlerFunc) http.HandlerFunc { return f }} api.Register(r) s := httptest.NewServer(r) diff --git a/web/web.go b/web/web.go index f82b71467..04d7f11ed 100644 --- a/web/web.go +++ b/web/web.go @@ -187,6 +187,7 @@ func New(logger log.Logger, o *Options) *Handler { defer h.mtx.RUnlock() return *h.config }, + h.testReady, ) if o.RoutePrefix != "/" {