Documentation

Grafana

Using Grafana with Metricfire

The easiest and fastest way to see your Metricfire data is in Grafana, which comes with your  Metricfire account. It's also possible to view your Metricfire data in a locally hosted Grafana.

Prometheus provide some clear documentation and helpful guides on creating queries here: https://prometheus.io/docs/visualization/grafana/#creating-a-prometheus-data-source

Your Grafana in  Metricfire

Your Metricfire account comes with a blank Grafana instance, with a datasource configured. This allows you to immediately graph the data you've sent us. Check out your Grafana here – https://app.metricfire.com/grafana/

Configuring a local Grafana instance to show Metricfire data

If you already have Grafana set up in your organisation, you can view your  Metricfire data in it by adding  Metricfire as a datasource.

Step-by-step

1. Add new Prometheus datasource:

In Grafana's configuration menu, click on Data Sources and select Prometheus

2. Apply the following settings:

Http URLhttps://app.metricfire.com/datasource

Select Basic Auth and provide Account ID and API key found in your Account Details at https://app.metricfire.com/

    User: [your-account-ID]

    Password[your-API-Key]

3. Click Save and Test:

After clicking on Save and Test, a green confirmation should appear stating that Data source is working.

Configuring a local Prometheus as a Metricfire datasource

It's possible, though not necessary, to use a local Prometheus as a datasource for your Metricfire Grafana.

Recommended Setup

The recommended way to add your Prometheus as a datasource to our Grafana as a service would be to first make it accessible over https (required) with basic authentication enabled (suggested). Some useful links on these things:

1. Generate your certificate:

One option is something like: 

https://letsencrypt.org/getting-started/

2. Add your certificate to your webserver to set up HTTPS:

Most web servers have some documentation on this. The examples in Prometheus use Nginx, so we recommend having a look at the nginx documentation: http://nginx.org/en/docs/http/configuring_https_servers.html

3. Combine with Nginx Basic Auth:

Prometheus provides a guide for enabling this:

https://prometheus.io/docs/guides/basic-auth/#nginx-configuration

After this is all configured, your prometheus should be accessible over https. When you're happy with it, go to https://app.metricfire.com/grafana/datasources and add a new Prometheus datasource.

That's complicated, I just want to test the Metricfire Grafana quickly

If you just want to graph a locally running prometheus you can expose it with ngrok (https://ngrok.com/), a tool for exposing localhost through a NAT or firewall quickly and securely. It isn't a permanent solution; the url for the datasource will change every time you restart Prometheus and you will need to edit your Metricfire Grafana datasource.