alexjustesen / speedtest-tracker-docs

Docs for Speedtest Tracker.
https://docs.speedtest-tracker.dev/
17 stars 23 forks source link

Grafana Dashboard #4

Closed alexdelprete closed 1 year ago

alexdelprete commented 1 year ago

Do we want to publish a ready-made Grafana dashboard? :)

I just completed it. It shows the history of the tests, an average per server, and a table for all tests. I added the jitter and packet-loss to the table views. I hope the influxdb structure won't change much. :)

image

alexjustesen commented 1 year ago

How would we go about doing that?

spcqike commented 1 year ago

One can simply share the JSON model (dashboard settings) or publish an existing dashboard to https://grafana.com/grafana/dashboards/

But not sure how one can publish there :) so to have a JSON that one can copy and import (and edit to one’s needs like data source) might be the easiest solution.

alexdelprete commented 1 year ago

How would we go about doing that?

I will replace the old one I made for the old project: https://grafana.com/grafana/dashboards/16339-speedtest-tracker/

This one is made for Influxdb2 with Flux queries, so users don't have to do anything. They simply create the datasource in Grafana (same parameters used in configuring influxdb2 in the app) then import the dashboard.

alexjustesen commented 1 year ago

I think this is a good thing we should add to documentation, basically a Grafana starter kit for speedtest graphing. Going to transfer the issue to that repo.

alexdelprete commented 1 year ago

I'm still polishing the dashboard...when ready, what do you want me to do to have this published in the docs?

alexjustesen commented 1 year ago

Share in these comments how to set it up and I'll move it to a docs page.

alexdelprete commented 1 year ago

Dashboard has been published on Grafana dash site: https://grafana.com/grafana/dashboards/17460-speedtest-tracker-v2/

The only thing the user needs is creating a new Data Source for InfluxDB, selecting Flux as Query Language, then configuring the URL of the influxdb2 server, the organization, the token and the default bucket. These configuration parameters are the same used in Speedtest Tracker to configure the integrated data export feature.

Once the data source is ready and tested, import this dashboard, and select the relevant data source just created.

Instructions for Grafana 9.x (check screenshots right below each list of steps):

  1. create a new data source
  2. choose InfluxDB
  3. choose Flux as Query Language
  4. input the URL of the server (same you used in Speedtest Tracker influx options)
  5. input the Organization (same you used in Speedtest Tracker influx options)
  6. input the Token (same you used in Speedtest Tracker influx options)
  7. choose the default bucket (same you used in Speedtest Tracker influx options)
  8. click Save&Test and make sure the response is datasource is working. 1 buckets found

image

image

After you created a working data source, you need to import the grafana dashboard (for each step, check screenshots below):

  1. Go to the dashboards list, on the right you'll see a blue button named new, hit the down arrow and choose Import
  2. In the input field labeled import via grafana.com type 17460 and click the Load button
  3. In the select box, choose the data source you created in steps 1-8 and click Import

image

image

image

image

You're done. If everything went ok, you should see the dashboard with all data from Speedtest Tracker. :)