Trickster is a reverse proxy cache for the Prometheus HTTP APIv1 that dramatically accelerates dashboard rendering times for any series queried from Prometheus. See our previous post about Why we Love Grafana and Prometheus. We are always super impatient so love cool things like Trickster. Dashboards that automatically refresh should now load on average 90% faster. Oh yeah!
Let’s walk through a quick installation for an existing Grafana/Prometheus setup.
Get the latest release (at time of writing):
mkdir /opt/trickster/ cd /opt/trickster/ wget https://github.com/Comcast/trickster/releases/download/v0.1.1/trickster-0.1.1.linux-amd64.gz gunzip trickster-0.1.1.linux-amd64.gz ln -s trickster-0.1.1.linux-amd64 trickster
Setup the config file for trickster as follows:
Create a systemd service file:
Enable and start the service:
Implementation in Grafana
To get Grafana to use trickster is very easy.
- Log into Grafana
- Hit the gear icon for “Configuration”, then select “Data Sources”
- Edit your existing Prometheus data source entry.
- Simply change the HTTP URL port from 9090 to 9089.
Example: http://prometheus.my-domain.tld:9090/prometheus -> http://prometheus.my-domain.tld:9089/prometheus
- “Save and Test” your configuration.
That’s it! If everything worked out you should now be using the Trickster cache for rendering graphs.
Dashboards that auto-refresh should now load on average 90% faster.