- input key handler causes 2 layout cycles on each keypress which can
clog up browser rendering when typing quickly
- this change adds a debounce to the key press handler of 500ms
Fixes#5308
Signed-off-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
This change switches the remote_write API to use the TSDB WAL. This should reduce memory usage and prevent sample loss when the remote end point is down.
We use the new LiveReader from TSDB to tail WAL segments. Logic for finding the tracking segment is included in this PR. The WAL is tailed once for each remote_write endpoint specified. Reading from the segment is based on a ticker rather than relying on fsnotify write events, which were found to be complicated and unreliable in early prototypes.
Enqueuing a sample for sending via remote_write can now block, to provide back pressure. Queues are still required to acheive parallelism and batching. We have updated the queue config based on new defaults for queue capacity and pending samples values - much smaller values are now possible. The remote_write resharding code has been updated to prevent deadlocks, and extra tests have been added for these cases.
As part of this change, we attempt to guarantee that samples are not lost; however this initial version doesn't guarantee this across Prometheus restarts or non-retryable errors from the remote end (eg 400s).
This changes also includes the following optimisations:
- only marshal the proto request once, not once per retry
- maintain a single copy of the labels for given series to reduce GC pressure
Other minor tweaks:
- only reshard if we've also successfully sent recently
- add pending samples, latest sent timestamp, WAL events processed metrics
Co-authored-by: Chris Marchbanks <csmarchbanks.com> (initial prototype)
Co-authored-by: Tom Wilkie <tom.wilkie@gmail.com> (sharding changes)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
1. Added an ability to resize text area on mouseclick
2. Remember selected target status button on page reload
Signed-off-by: Maria Nemtinova <nemtinovamasha@gmail.com>
* web: updated bootstrap3-typeahead file to work with bootstrap 4.0.0
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: Replaced bootstrap-3.3.1 with bootstrap 4.0.0
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: Added bootstrap4-glyphicons as 4.0.0 doesnt include bootstrap3 glyphicons
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated js jquery to 3.3.1
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated _base.html to import new bootstrap 4.0.0, jquery3.3.1 and bootstrap class tags to be 4.0 compatible
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: _base.html missed word out in title tag (Server).
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated alerts.html class names and tags to be bootstrap 4 compatible.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated config.html class names and tags to be bootstrap 4 compatible.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated flags.html class names and tags to be bootstrap 4 compatible.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated service-discovery.html class names and tags to be bootstrap 4 compatible.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated status.html class names and tags to be bootstrap 4 compatible.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated targets.html class names and tags to be bootstrap 4 compatible.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: updated graph_template.handlebar class names and tags to be bootstrap 4 compatible.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: alerts.css fix for button color inheritance on alerts page.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: graph.css fix for color inheritance.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: prometheus.css updated to fix nav bar.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* web: previous merge conflict not fixed correctly on _base.html
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* menu.lib and prom.lib imports updated
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* bootstrap 4.1.3 imported
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Bootstrap 4.1.3 imported into _base.html
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* bootstrap 4.1.3 imported into prom.lib
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* menu.lib style adjusted to view sidebar
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Alert colour uplifted to bootstrap 4.1.3
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Alerts display code reformatted similarly to config
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Consoles pages adjusted to account for new navbar
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* LHS Menu fixed in console pages
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Minor changes to prom_console to adjust lhs nav
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Prom.lib and some css updated to fix console graph controls
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Bootstrap 4.0.0 files removed
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Consoles configured so that the graph fits with the new side bar, css files also adjusted
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Import popper.min.js for dropdowns
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Popper.min.js imported locally
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Re-added #4764 and fixed css
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Removed .DS_Store
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Rebuilt assets
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* Spaces between buttons and inputs on graph page removed
Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
* fixed spacing in buttons on /targets
Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>
* Updated vfsdata.go
Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>
* fixed typeahead issue
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
* added css for dropdown
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
* changed order of css imports
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
* tinkered with CSS changes to make keyboard select and mouseover match
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
* *: bump gRPC dependencies
This change updates the gRPC dependencies to more recent versions:
* github.com/gogo/protobuf => v1.2.0
* github.com/grpc-ecosystem/grpc-gateway => v1.6.3
* google.golang.org/grpc => v1.17.0
In addition scripts/genproto.sh leverages Go modules information instead of
hardcoding SHA1 commits. This ensures that the code is generated from
the exact same sources.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Run 'make proto' in CI
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Revert tabs -> spaces change
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fix 'make proto' step
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* 'go get' grpc/protobuf dependencies
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Prepopulate cache with go mod download
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* *: use latest release of staticcheck
It also fixes a couple of things in the code flagged by the additional
checks.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Use official release of staticcheck
Also run 'go list' before staticcheck to avoid failures when downloading packages.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* added `Copy to clipboard` button
Signed-off-by: Stafford Williams <stafford.williams@gmail.com>
* generate vsfdata
Signed-off-by: Stafford Williams <stafford.williams@gmail.com>
* new lines
Signed-off-by: Stafford Williams <stafford.williams@gmail.com>
* single newline
Signed-off-by: Stafford Williams <stafford.williams@gmail.com>
When a metric has a null value, number formatters like
`humanizeNoSmallPrefix` will throw "Uncaught TypeError: Cannot read
property 'toPrecision' of null".
This is fixed by explicitly checking for `null` and returning the string
"null".
Note: This is usually not seen as rickshaw doesn't show annotations for
null values, but still calls the formatter.
Signed-off-by: David Coles <coles.david@gmail.com>
* update promlog to latest version
Signed-off-by: Alex Yu <yu.alex96@gmail.com>
* Update api tests, fix main setup
Signed-off-by: Alex Yu <yu.alex96@gmail.com>
* tidy go.sum
Signed-off-by: Alex Yu <yu.alex96@gmail.com>
* revendor prometheus/common
Signed-off-by: Alex Yu <yu.alex96@gmail.com>
* only initialize config; use kingpin for remote_storage_adapter
Signed-off-by: Alex Yu <yu.alex96@gmail.com>
* actually parse the flags
Signed-off-by: Alex Yu <yu.alex96@gmail.com>
* clean up imports
Signed-off-by: Alex Yu <yu.alex96@gmail.com>
* web: added ability to set page title through flag.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* Reformatted variable names and Flag description for readability.
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* assets_vfsdata.go
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* Flag name changed from web.ui-title to web.page-title
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
* make assets
Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
By default the gRPC client of the REST API gateway relies on the
HTTP_PROXY variable to connect to the local gRPC server which isn't
desired as the server runs in the same process. This change uses a
custom dialer that connects directly to the server's address.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>