alexjustesen / speedtest-tracker

Speedtest Tracker is a self-hosted internet performance tracking application that runs speedtest checks against Ookla's Speedtest service.
https://speedtest-tracker.dev/
MIT License
2.78k stars 107 forks source link

[HELP] Guide for using Influx db with Speedtest-Tracker #186

Closed rhcp011235 closed 1 year ago

rhcp011235 commented 1 year ago

Hello.

I have this running on my Unraid Instance and it has been great, I finally got around to getting it hooked into InfluxDB2 about a week or so ago.

I saw some people with grafana library in InfluxDB getting a Nice graph working and I am not too keen on influxDB.

I know more Oracle/DB2/Mysql type stuff.

Any help on getting a nice dashboard in Influx would be helpful to everyone :)

Thank you

alexdelprete commented 1 year ago

You don't really expect a guide on using Grafana, right? :)

But you're a really lucky person, I already prepared the dashboard for influxdb v2: https://github.com/alexjustesen/speedtest-tracker-docs/issues/4#issuecomment-1323035795

If you confirm the intructions to import the dash are ok, @alexjustesen will publish it in the official docs of the project.

Let us know.

image

rhcp011235 commented 1 year ago

You don't really expect a guide on using Grafana, right? :)

But you're a really lucky person, I already prepared the dashboard for influxdb v2: alexjustesen/speedtest-tracker-docs#4 (comment)

If you confirm the intructions to import the dash are ok, @alexjustesen will publish it in the official docs of the project.

Let us know.

image

This requires you to install Grafana eh? Is there anyway to simply use Influx? without adding more to it? I am very new to all this and its kind of complex :)

rhcp011235 commented 1 year ago

not sure why it closed it.

alexdelprete commented 1 year ago

You can reopen it...can't you?

This requires you to install Grafana eh? Is there anyway to simply use Influx? without adding more to it? I am very new to all this and its kind of complex :)

How do you want to display the graphs? Grafana does that. You need a tool.

Maybe in the future @alexjustesen can implement some graphs in the dashboard, but since there's influx, I wanted to see data immediately.

Grafana is simple...check some guides on youtube...once you have it installed, just follow the procedure above to import my dashboard.

rhcp011235 commented 1 year ago

@alexdelprete I will try, I am very very new to all of this. For years ive been a DBA (But Cli based stuff that IMHO seems simple)

All of these GUI/Point and click things seem to be confusing to me, because it basically just does whatever vs having you set it up. so you really dont learn much.

If you feel like helping me :) I have Skype and such. :)

alexjustesen commented 1 year ago

@rhcp011235 thanks for using Speedtest Tracker! I too used to be a dba, then did a bit of analytics work but during that was always a web developer so this project feels like home.

rhcp011235 commented 1 year ago

@alexjustesen Thank you! I bet it does for you, I never got into any web dev nor dealt with graphics. Ive always been behind the scenes doing actual DB work and Data mining and Data warehouse type stuff. so this is all like Korean to me :)

alexdelprete commented 1 year ago

For years ive been a DBA

After a couple of years of development, for years I've done system & network management, then project management, then presales and Sales. A little bit of everything. :)

All of these GUI/Point and click things seem to be confusing to me, because it basically just does whatever vs having you set it up

Oh that is not correct. I'm playing with Grafana since 3-4 months...you really need to understand databases, queries, etc. You would be very good with Grafana. Usually I suck with UI/GUI stuff...but Grafana is pretty good on that side once you understand data, where it is, and what you want to correlate and present. Install it and play with it (with my dashboard for example), with your kind of experience, I'm sure you'll like it. You start with something and customize it, to learn how to use it. Try it.

rhcp011235 commented 1 year ago

Got it working :) Thank you @alexjustesen @alexdelprete

rhcp011235 commented 1 year ago

closed

alexdelprete commented 1 year ago

Got it working :) Thank you @alexjustesen @alexdelprete

I told you it was easier than you thought. :)

So the steps of the procedure work? Can we publish them in the official docs?

rhcp011235 commented 1 year ago

Got it working :) Thank you @alexjustesen @alexdelprete

I told you it was easier than you thought. :)

So the steps of the procedure work? Can we publish them in the official docs?

Semi.

I had to modify the queries because I named my bucket Speedtest-tracker. Other than that? It was very simple

alexdelprete commented 1 year ago

I had to modify the queries because I named my bucket Speedtest-tracker. Other than that? It was very simple

You can rename a bucket in InfluxDB v2. I will add that to the procedure in case the user has already created the bucket.

image

PovilasID commented 1 year ago

Hey, I made a selector variable for buckets and made all panels listen for it. Now you do not need to rename buckets in InfluxDB. image

Here is Gist for it https://gist.github.com/PovilasID/113c5d2ef6fc9fbddcd19864466399a6 I suggest adding Grafana dashboard's export in the repo so it can be versioned

alexdelprete commented 1 year ago

I made a selector variable for buckets and made all panels listen for it.

Thanks. I applied the variable to the panels and uploade v2 to grafana dashboards. There was also a bug when multiple servers where used, I modified the queries and now should be good also in that case.

image

If somebody could test the import (to make sure latest revision is used) and report back it would be very helpful. Thanks in advance.

PovilasID commented 1 year ago

If somebody could test the import

I tested dash id 17460 looks good 👍

alexdelprete commented 1 year ago

Thanks a lot for the help. Do you have multiple speedtest servers configured? Because the dash wasn't working properly in those cases. I fixed it.

PovilasID commented 1 year ago

Thanks a lot for the help. Do you have multiple speedtest servers configured? Because the dash wasn't working properly in those cases. I fixed it.

Not entire sure... a) Not all testing servers get passed to my influxdb instance because of #301 so I have only a couple of records. b) They are from different servers and all the charts look populated... so it looks like it is fixed but I can not validate 100%

PovilasID commented 1 year ago

I updated the latest version with some bar charts: image

https://gist.github.com/PovilasID/113c5d2ef6fc9fbddcd19864466399a6

alexdelprete commented 1 year ago

Where did you put those bars exactly? A larger screenshot would help. :)