Commit graph

7150 commits

Author SHA1 Message Date
CSTDev 4262ad92ce React ui add query stats (#6190)
* Adds the query stats to UI

Adds the query load time, resolution and total number of time series,
as the current UI has

Signed-off-by: cstdev <pietomb00@hotmail.com>

* Implement unit test for QueryStats

Signed-off-by: cstdev <pietomb00@hotmail.com>

* Tidy Query Stats component

Rename it and expose a interface for the values it displays
Make it a functional component as it has no state or lifecycle
Better null/undefined checks
Only render if needed, decided by the panel
Remove old stats if the next errors

Signed-off-by: cstdev <pietomb00@hotmail.com>
2019-10-23 12:47:37 +02:00
Callum Styan 5f1be2cf45 Refactor calculateDesiredShards + don't reshard if we're having issues sending samples. (#6111)
* Refactor calculateDesiredShards + don't reshard if we're having issues
sending samples.
* Track lastSendTimestamp via an int64 with atomic add/load, add a test
for reshard calculation.
* Simplify conditional for skipping resharding, add samplesIn/Out to shard
testcase struct.

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-10-21 15:54:25 -06:00
Björn Rabenstein b5e603ceb8
Merge pull request #6119 from cstyan/rw-dashboard-shards
Add additional shards/segment graphs to remote write dashboard.
2019-10-21 21:55:38 +02:00
Julius Volz 1c238ac086
Add links between classic and new UIs (#6191)
The links preserve the graph settings between the two UIs.

Fixes https://github.com/prometheus/prometheus/issues/6162

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-10-21 20:18:47 +02:00
Callum Styan da6d46625f Repeat shards panels on the queue label.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-10-21 11:03:50 -07:00
Boyko b5a16a8f86 make expression input controlled (#6174)
* make expression input controlled

Signed-off-by: blalov <boyko.lalov@tick42.com>

* close menu explicitly  when autosuggestion dropdown is hidden

Signed-off-by: blalov <boyko.lalov@tick42.com>
2019-10-20 22:52:29 +02:00
Simon Pasquier 3acc3e856c
Adding unit test for target group (#6141)
* adding unit test for target group

Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>

* Improve unit tests for target group

Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>

* Fix imports

Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>

* Improve test by asserting on whole Target Group object

Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-18 16:24:26 +02:00
Simon Pasquier d2645018cf
.circleci/config.yml: fix CircleCI image tag for publish (#6179)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-18 16:08:26 +02:00
Hrishikesh Barman 7567376a24 replace AUTH_FILE with PROMBENCH_GKE_AUTH (#6180)
Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>
2019-10-18 15:34:57 +03:00
Simon Pasquier 19ce6b7f5f
discovery: fix more error logs on context cancelation (#6133)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-18 11:48:51 +02:00
Hrishikesh Barman 96273cc292 Added GitHub actions workflow for prombench. (#6173)
Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>
2019-10-18 12:41:01 +03:00
Simon Pasquier a19aea4ec2 .circleci/config.yml: fix publish jobs (#6176)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-18 10:04:19 +02:00
Krasi Georgiev 5b8ff9b8a4
Merge the 2.13 release branch (#6169)
* Include tsdb tool in builds (#6085) (#6089)

Add the tsdb tool to promu so that it's included in the release
tarballs.

Signed-off-by: Ben Kochie <superq@gmail.com>

* web/ui: fix for CVE-2019-10215 (#6098)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* cut 2.13 release (#6099)

Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>

* Fix panic in ARM builds of Prometheus (#6110)

An extra sync.Pool was added during a refactor which caused some 64 bit,
atomically accessed variables to no longer be 64 bit aligned. By moving
all atomically accessed variables to the beginning of the struct they
are guaranteed to be 64 bit aligned.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>

* promql: fix potential panic in the query logger (#6094)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Cut release 2.13.1 (#6145)

Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2019-10-18 02:21:58 +03:00
Callum Styan 818974ff8f Rewrite remote write dashboard using base grafonnet.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-10-17 15:40:58 -07:00
Jean-Baptiste Le Duigou 0939d566f3 Improve test by asserting on whole Target Group object
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-17 21:25:38 +02:00
Jean-Baptiste Le Duigou 3309ffa482 Fix imports
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-17 21:12:50 +02:00
Jean-Baptiste Le Duigou 024c38c060 Merge remote-tracking branch 'upstream/master' 2019-10-17 21:09:46 +02:00
Ritesh Shrivastav 0f91ff4540 React UI: Sanitize HTML string to allow only supported elements (#6165)
* Add component to sanitize html

Signed-off-by: Ritesh Shrivastav <ritesh.conf@gmail.com>

* Use SanitizeHTML component to allow only supported elements

Signed-off-by: Ritesh Shrivastav <ritesh.conf@gmail.com>

* Add allowedTags props in SanitizeHTML component

Signed-off-by: Ritesh Shrivastav <ritesh.conf@gmail.com>
2019-10-17 20:52:24 +02:00
Peter Tribble 90c3615a2c Fix solaris build. (#6149)
* Fix solaris build.
* Tidy up build constraints on statfs_linux_386.go

Signed-off-by: Peter Tribble <peter.tribble@gmail.com>
2019-10-17 18:43:29 +01:00
Björn Rabenstein 61e14a6bdb
Merge pull request #6151 from yuxiaobo96/prometheus-check3
new world spelling mistake
2019-10-17 17:49:37 +02:00
Julius Volz ccac71ca5a
Update all React app node modules (#6153)
* Update all React app node modules

I ran "yarn upgrade --latest" and then fixed items that caused errors
with new linter settings in the React UI source.

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fix more React UI lint errors that fail CI

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-10-17 16:34:02 +02:00
Julius Volz 63899f5529
Remove obsolete console.log() statements (#6159)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-10-17 16:24:07 +02:00
Julius Volz bca6e90ea6
Integrate beginning of React UI (#5694)
* Initial commit from Create React App

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Initial Prometheus expression browser code

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Grpahing, try out echarts

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Switch to flot

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add metrics fetching and stuff

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Autosuggest and graph improvements

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Start implementing graph controls, add loading spinner

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* So many new features and fixes

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fixed and built more features

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Make datetimepicker clear work

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Don't abort when executing empty expression

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove TabPaneAlert

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Split components into separate files

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add table time input

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Move first files to TypeScript!

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* More TypeScript conversions

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* More TS conversions

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* More TS conversions

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* More TS conversions

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* More TS conversions

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* More TS fixes

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Convert Graph to TS

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Changes

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Resize detector, start building legend, axis font colors

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Make graph legend work

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add URL params support and much more

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Put panel state into panel list, write URL options

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Change order of Graph and Table tabs

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Generalize time input naming more

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Work on history functionality

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* npm updates

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Move loading indicator into "Execute" button

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fix typo

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Revert "Move loading indicator into "Execute" button"

This reverts commit ce7daee1f1af35da6c0d8b5517272839285ccfec.

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Improve error message when failing to fetch server time

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Move all code to Prometheus repo target dir

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add react-app Makefile step and check in generated assets

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add preliminary npm packages notice to NOTICE file

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Update React app's favicon and metadata

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove RP server refs, cleanups

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Use CircleCI image that includes NodeJS

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add some missing React output assets

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Preserve CRLF in generated React files

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Switch from npm to yarn for React UI

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Save npm licenses and include them in release tarball

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Install npm on Travis

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove npm license tarball from source

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove React graph bundle from source

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Don't check in any compiled web assets

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Update README.md with node/yarn/React UI info

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fix asset build step on CircleCI promu crossbuild

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Try to fix multi-arch go generate

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove check_assets from Travis CI build

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Prevent rebuilding of unchanged React app parts

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fix npm license tarball path for promu

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Simplify Makefile

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Clarify build instructions in README.md

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Make minimal JS test pass

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Integrate React app tests into Makefile

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Separate react-app-tests target, but run it from CI

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fix working directory for React app tests

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove local modifications to Makefile.common

This means that CircleCI will not run the React app tests, but at least
Travis still will...

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Depend on node_modules path for npm_licenses target

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Simplify tarball/docker/build Makefile targets

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Include React tests in "test" target

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Remove reference to removed "check_assets" target

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Do initial resize of expression input field

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Add React app proxying to local Prometheus in dev mode

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-10-17 14:38:09 +02:00
yuxiaobo 7850f1b35c new world spelling mistake
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-17 19:09:54 +08:00
Ben Kochie 16370e6880
Update storage considerations documentation (#6134)
* Improve clarity of internal storage durability.
* Add notes about remote storage.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-10-16 21:45:01 +02:00
Jean-Baptiste Le Duigou 9372a224b5 Improve unit tests for target group
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-16 18:03:05 +02:00
Jean-Baptiste Le Duigou 1f9eb09e8e Improve unit tests for target group
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-15 21:43:31 +02:00
Björn Rabenstein 3c70284802
Merge pull request #6137 from gouthamve/propose-ganesh-tsdb
Step down and propose Ganesh as TSDB maintainer
2019-10-15 12:00:58 +02:00
Simon Pasquier f7e1f064e3
Makefile: change default target to include check_assets (#5932)
The CI has only to execute "make" to run all necessary checks.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-15 09:33:38 +02:00
Goutham Veeramachaneni b035c55a96
Step down and propose Ganesh as TSDB maintainer
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2019-10-15 12:42:20 +05:30
Jean-Baptiste Le Duigou 5146bb14ef adding unit test for target group (#6138)
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-14 23:48:08 +01:00
Jean-Baptiste Le Duigou 15de05d55e adding unit test for target group
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-14 21:05:11 +02:00
Krasi Georgiev b05b5f9a30
remove debug fmt.Println in tombstones. (#6135)
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2019-10-14 14:45:26 +03:00
Ganesh Vernekar 04c1c7974e
Clarify the branch in preparing the release (#6122)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-10-11 19:56:07 +05:30
Björn Rabenstein 4275c4a4f6
Merge pull request #6123 from yuxiaobo96/prometheus-check2
Correct spelling mistakes
2019-10-11 01:55:25 +02:00
yuxiaobo 47e51c8b2b Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-10 18:46:27 +08:00
Alex Dzyoba e3882629ba promql: Move tests to testutil (#6103)
* promql: Move tests to testutil

Signed-off-by: Alex Dzyoba <alex@dzyoba.com>

* promql: Match error type via errors.As in tests

Signed-off-by: Alex Dzyoba <alex@dzyoba.com>

* promql: Remove unused `expectedList` func from lex_test.go

Signed-off-by: Alex Dzyoba <alex@dzyoba.com>
2019-10-09 18:06:53 -06:00
Callum Styan 81fa63006c Add additional shards/segment graphs to remote write dashboard.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-10-09 09:59:02 -07:00
Krasi Georgiev 81d284f806
Merge the 2.13 release branch to master (#6117) 2019-10-09 17:41:46 +02:00
Frederic Branczyk 6b22997791
Merge pull request #6116 from simonpasquier/fix-sd-error-logs-on-cancel
discovery: don't log errors on context cancelation
2019-10-09 17:05:44 +02:00
Simon Pasquier 8ec6f02854 discovery: don't log errors on context cancelation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-09 11:51:38 +02:00
陈谭军 0f022aa42b fix unreasonable goimports (#6115)
Signed-off-by: tanjunchen <2799194073@qq.com>
2019-10-09 09:43:56 +01:00
Giedrius Statkevičius ad58fc4765 ui: handle null response properly (#6071)
* web/ui: handle null case

The call might sometimes return /api/v1/label/__name__/values the
following:

```
{"status":"success","data":null}
```

Then the `index.js` file assumes that `data` is not `null`. However,
that assumption fails and then we get this error in the console:

```
graph.js?v=foo:317 Uncaught TypeError: Cannot read property 'length' of null
    at Object.success (graph.js?v=foo:317)
...
```

Then it becomes impossible to, for example, send a simple query like
`time()` and graph the results.

Fix it by using an empty array as the result if it is `null`.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* ui: update static assets data

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
2019-10-08 19:52:12 -06:00
Callum Styan 84ff928606 Make sure the remote write storage uses a dedupe logger. (#6113)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-10-08 11:42:00 -06:00
Björn Rabenstein 706f3b2d17
Merge pull request #6054 from nevill/refactor/manager_test
Refactor on discovery/manager_test.go
2019-10-08 13:11:28 +02:00
Björn Rabenstein fc945c4e8a
Merge pull request #6021 from prometheus/reload-checkpoint-async
Garbage collect asynchronously in the WAL Watcher
2019-10-08 11:01:13 +02:00
Ganesh Vernekar 4dfc7a2e77
Remove unnecessary lock in loadWAL (#6107)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-10-08 11:17:40 +05:30
Nevill 7465f27ea5 Refactor on discovery/manager_test.go
- Use testutil.ToFloat64 to collect testing metrics
- Declare ServiceDiscoveryConfig directly instead of calling Unmarshal on a piece of YAML

Signed-off-by: Nevill <nevill.dutt@gmail.com>
2019-10-08 10:18:48 +08:00
Chris Marchbanks 8df4bca470
Garbage collect asynchronously in the WAL Watcher
The WAL Watcher replays a checkpoint after it is created in order to
garbage collect series that no longer exist in the WAL. Currently the
garbage collection process is done serially with reading from the tip of
the WAL which can cause large delays in writing samples to remote
storage just after compaction occurs.

This also fixes a memory leak where dropped series are not cleaned up as
part of the SeriesReset process.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2019-10-07 14:36:10 -06:00
George Felix 895abbb7d0 Replaced test validations with testutils on storage/remote/codec_test.go (#6097)
* Replaced test validations with testutils on storage/remote/codec_test.go

Signed-off-by: George Felix <george.felix@ubeeqo.com>

* gofmt

Signed-off-by: George Felix <george.felix@ubeeqo.com>

* Removed shouldPass assertion

Signed-off-by: George Felix <gfelixc@gmail.com>

* Fixes to improve readability

Signed-off-by: George Felix <george.felix@ubeeqo.com>

* Fixes based on code review comments

Signed-off-by: George Felix <george.felix@ubeeqo.com>
2019-10-07 11:35:53 -06:00