prometheus/storage/remote
Robert Fratto bc72a718c4
Initial draft of prometheus-agent (#8785)
* Initial draft of prometheus-agent

This commit introduces a new binary, prometheus-agent, based on the
Grafana Agent code. It runs a WAL-only version of prometheus without the
TSDB, alerting, or rule evaluations. It is intended to be used to
remote_write to Prometheus or another remote_write receiver.

By default, prometheus-agent will listen on port 9095 to not collide
with the prometheus default of 9090.

Truncation of the WAL cooperates on a best-effort case with Remote
Write. Every time the WAL is truncated, the minimum timestamp of data to
truncate is determined by the lowest sent timestamp of all samples
across all remote_write endpoints. This gives loose guarantees that data
from the WAL will not try to be removed until the maximum sample
lifetime passes or remote_write starts functionining.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* add tests for Prometheus agent (#22)

* add tests for Prometheus agent

* add tests for Prometheus agent

* rearranged tests as per the review comments

* update tests for Agent

* changes as per code review comments

Signed-off-by: SriKrishna Paparaju <paparaju@gmail.com>

* incremental changes to prometheus agent

Signed-off-by: SriKrishna Paparaju <paparaju@gmail.com>

* changes as per code review comments

Signed-off-by: SriKrishna Paparaju <paparaju@gmail.com>

* Commit feedback from code review

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* Port over some comments from grafana/agent

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* Rename agent.Storage to agent.DB for tsdb consistency

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* Consolidate agentMode ifs in cmd/prometheus/main.go

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* Document PreAction usage requirements better for agent mode flags

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* remove unnecessary defaultListenAddr

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* `go fmt ./tsdb/agent` and fix lint errors

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

Co-authored-by: SriKrishna Paparaju <paparaju@gmail.com>
2021-10-29 16:25:05 +01:00
..
chunked.go
chunked_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
client.go Enable HTTP2 again (#9398) 2021-09-26 23:16:12 +02:00
client_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
codec.go Add initial support for exemplar to the remote write receiver endpoint (#9319) 2021-09-21 14:53:27 -06:00
codec_test.go Add initial support for exemplar to the remote write receiver endpoint (#9319) 2021-09-21 14:53:27 -06:00
ewma.go
intern.go Move away from testutil, refactor imports (#8087) 2020-10-22 11:00:08 +02:00
intern_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
max_timestamp.go Remote: Do not collect non-initialized timestamp metrics (#8060) 2020-10-15 23:53:59 +02:00
metadata_watcher.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
metadata_watcher_test.go Fix some gofmt warnings (#8743) 2021-04-22 08:43:30 -06:00
queue_manager.go Remove Individual Data Type Caps in Per-shard Buffering for Remote Write (#8921) 2021-08-09 15:20:53 -06:00
queue_manager_test.go remove redundant type conversion (#9126) 2021-07-28 13:33:46 +05:30
read.go LabelNames API with matchers (#9083) 2021-07-20 18:08:08 +05:30
read_handler.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
read_handler_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
read_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30
storage.go Initial draft of prometheus-agent (#8785) 2021-10-29 16:25:05 +01:00
storage_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30
write.go Initial draft of prometheus-agent (#8785) 2021-10-29 16:25:05 +01:00
write_handler.go Add initial support for exemplar to the remote write receiver endpoint (#9319) 2021-09-21 14:53:27 -06:00
write_handler_test.go Add initial support for exemplar to the remote write receiver endpoint (#9319) 2021-09-21 14:53:27 -06:00
write_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30