Commit Graph

9 Commits

Author SHA1 Message Date
Fabian Reinartz
87918f3097 Merge branch 'master' into dev-2.0 2017-09-04 14:09:21 +02:00
Max Leonard Inden
1c96fbb992
Expose current Prometheus config via /status/config
This PR adds the `/status/config` endpoint which exposes the currently
loaded Prometheus config. This is the same config that is displayed on
`/config` in the UI in YAML format. The response payload looks like
such:
```
{
  "status": "success",
  "data": {
    "yaml": <CONFIG>
  }
}
```
2017-08-13 22:21:18 +02:00
Brian Brazil
e5f94145b8 Drop series for federation if latest sample is stale. 2017-05-24 14:27:17 +01:00
Fabian Reinartz
8c768f2ca3 web: Fix federation for instance label 2017-04-05 14:53:34 +02:00
Brian Brazil
8cd5aff8fe Send instance="" with federation if instance not set.
This is needed for federating non-instance level metrics, so they don't
end up with the instance label of the prometheus target.

Also sort external labels, so label output order is consistent.
2017-03-30 06:48:48 +01:00
Brian Brazil
dbb65846f1 Add unittest for federation external_labels behaviour 2017-03-30 06:48:48 +01:00
beorn7
717dd8adac web: add more federation test scenarios 2016-09-15 15:23:55 +02:00
beorn7
784a8ad7c5 web: Inline httptest.NewRequest because it only exists in Go1.7+ 2016-09-15 15:06:36 +02:00
beorn7
39c4915401 federation: Collapse time series of the same name
This will avoid duplicate MetricFamilies, thereby shrinking the size
of the federation payload and also creating legal text format.

Also, add unit tests for federation. They were also needed for the
previous state of the code, but were missing.
2016-09-14 19:35:20 +02:00