This creates a new `model` directory and moves all data-model related
packages over there:
exemplar labels relabel rulefmt textparse timestamp value
All the others are more or less utilities and have been moved to `util`:
gate logging modetimevfs pool runtime
Signed-off-by: beorn7 <beorn@grafana.com>
* add a negative boost for some trigonometric functions that can overlapp other regular promQL functions
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* add comments to explain the purpose of the attribute boost
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
I would like to avoid extra API call's to determine if we are running in
Agent Mode, so I think we could use this approach.
This is a bootstrap of #9612
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
* 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>
* Fix broken prefixed asset links in webpack build
Fixes https://github.com/prometheus/prometheus/issues/9585
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Use .env file for PUBLIC_URL npm build env var
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* update documentation around react-app and how to upgrade the npm dependencies
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* wording around caution to take when updating the deps
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* fixing the npm version to be used and explain where you should perform the npm install command
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* simplify what is required to build prometheus from the source
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* aligned period and removed redondant word installed
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* set nodeJS version to be used at 16
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* describe manuel steps to update a dependency for the react-app
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
* rewording of the manuel step to update the dependencies
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This updates React, TypeScript, and some other node packages (but not
everything).
A couple of notes:
- `enzyme-adapter-react-16` does not have a React 17 equivalent yet, so I
switched to the fork `@wojtekmaj/enzyme-adapter-react-17`
- A bunch of tests are still failing because I think in the enzyme testing
environment, a browser API (`ResizeObserver`) is missing, and maybe for other
reasons. This needs to be explored + fixed.
- The TypeScript update introduced more stringent rules, which required fixing
up a bunch of pieces of code a bit.
- The `use-media` package doesn't work with React 17 yet, so I just built our
own minimal `useMedia` hook instead (just a couple of lines).
- I commented out part of the code in `withStartingIndicator.tsx` because it
fails the now-stricter lint checks. It needs to be fixed (and not commented
out).
Signed-off-by: Julius Volz <julius.volz@gmail.com>