Trickster - Open Source Dashboard Accelerator for Prometheus
Clone or download
jranson Merge pull request #93 from SuperQ/no_invalid_config
Panic when attempting to configure invalid cache
Latest commit 202c393 Oct 29, 2018
Permalink
Failed to load latest commit information.
conf Cleanup BoltDB config Aug 15, 2018
deploy Cleanup BoltDB config Aug 15, 2018
docs Cleanup BoltDB config Aug 15, 2018
.gitignore Fix deps in Makefile Jul 9, 2018
.travis.yml Add test to build pipeline Jul 9, 2018
CODE_OF_CONDUCT.md Add Code of Conduct Mar 30, 2018
CONTRIBUTING.md Move non-existent Makefile test target from docs Jun 18, 2018
Gopkg.lock Update dependencies Aug 7, 2018
Gopkg.toml Merge branch 'master' into caching Aug 7, 2018
LICENSE First Commit Mar 29, 2018
MAINTAINERS.md Add BoltDb support. Jul 1, 2018
Makefile Fixup PHONY/trickster binary path. Jul 9, 2018
NOTICE Remove trailing whitespace Jun 18, 2018
README.md Fix GitHub URL to capitalise first letter of org Jun 18, 2018
boltdb.go Cleanup BoltDB config Aug 15, 2018
boltdb_test.go fix tests Jul 10, 2018
cache.go Panic when attempting to configure invalid cache Oct 25, 2018
config.go Merge pull request #90 from SuperQ/superq/flags Aug 15, 2018
filesystem.go Adjust capitalization on BoltDB, rename mustMakeDirectory to makeDire… Jul 1, 2018
filesystem_test.go Cleanup import style. Jul 1, 2018
flags.go Rename application name and version constants Jun 18, 2018
flags_test.go go fmt. Jul 1, 2018
handlers.go Change real-time request test to use ctx.Time in milliseconds Aug 2, 2018
handlers_test.go Add ping unit test Jul 10, 2018
logging.go Fix GitHub URL to capitalise first letter of org Jun 18, 2018
logging_test.go go fmt. Jul 1, 2018
main.go Increment patch version Aug 15, 2018
memory.go Add unit tests Jun 25, 2018
memory_test.go Cleanup import style. Jul 1, 2018
metrics.go Add /debug/pprof endpoints to metrics port Jul 12, 2018
model.go Cleanup License Comment formatting Apr 10, 2018
redis.go Use password for connecting when provided Aug 15, 2018
redis_test.go Add BoltDb support. Jul 1, 2018

README.md

Trickster Build Status

Go Report Card

Trickster is a reverse proxy cache for the Prometheus HTTP APIv1 that dramatically accelerates dashboard rendering times for any series queried from Prometheus.

How it works

1. Delta Proxy

Most dashboards request the entire time range of data from the time series database, every time a dashboard loads or reloads. Trickster's Delta Proxy inspects the time range of a client query to determine what data points are already cached, and requests from Prometheus only the data points still needed to service the client request. This results in dramatically faster chart load times for everyone, since Prometheus is queried only for tiny incremental changes on each dashboard load, rather than several hundred data points of duplicative data.

2. Step Boundary Normalization

When Trickster requests data from Prometheus, it adjusts the clients's requested time range slightly to ensure that all data points returned by Prometheus are aligned to normalized step boundaries. For example, if the step is 300s, all data points will fall on the clock 0's and 5's. This ensures that the data is highly cacheable, is conveyed visually to users in a more familiar way, and that all dashboard users see identical data on their screens.

3. Fast Forward

Trickster's Fast Forward feature ensures that even with step boundary normalization, real-time graphs still always show the most recent data, regardless of how far away the next step boundary is. For example, if your chart step is 300s, and the time is currently 1:21p, you would normally be waiting another four minutes for a new data point at 1:25p. Trickster will break the step interval for the most recent data point and always include it in the response to clients requesting real-time data.

Install

Docker

Docker images are available on Docker Hub:

$ docker run --name trickster -d -v /path/to/trickster.conf:/etc/trickster/trickster.conf -p 0.0.0.0:9090:9090 tricksterio/trickster

See the 'deploy' Directory for more information about using or creating Trickster docker images.

Kubernetes and Helm

See the 'deploy' Directory for both Kube and Helm deployment files and examples.

Building from source

To build Trickster from the source code yourself you need to have a working Go environment with version 1.9 or greater installed.

You can directly use the go tool to download and install the trickster binary into your GOPATH:

$ go get github.com/Comcast/trickster
$ trickster -origin http://prometheus.example.com:9090

You can also clone the repository yourself and build using make:

$ mkdir -p $GOPATH/src/github.com/Comcast
$ cd $GOPATH/src/github.com/Comcast
$ git clone https://github.com/Comcast/trickster.git
$ cd trickster
$ make build
$ ./trickster -origin http://prometheus.example.com:9090

The Makefile provides several targets:

  • build: build the trickster binary
  • docker: build a docker container for the current HEAD
  • clean: delete previously-built binaries and object files

More information

  • Refer to the docs directory for additional info.

Contributing

Refer to CONTRIBUTING.md