Docker Speedtest Grafana is a clean graphical representation of your internet speeds over time.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] it's your open source advocate and i'm back with another video today we're going to talk about a speed test grafana and this is running in docker so in the last couple of videos that i've done where i've done speed tests for you guys that are self-hosted open source things like libre tests and open speed tests a lot of the questions that i get were how do i do this and then graph out the results over time and see some information in a dashboard so i went out there and i found this now the difference is this is going to be using an online speed test somewhere out there in different servers they're not like your isp servers they're actually just servers that you can go hit anytime you want to like speedtest.net or fast.com those kind of things but in this case it's going to use a cli version it's going to bring that information back into an influx database and then it's going to graph that stuff here in grafana well i assume it's an influx database it could be some other kind of database but it's graphing it in a grafana so setting this up was really really straightforward very very simple i only had to change a couple of things in an env file which was great and then jump it up started running and i got my immediate results pretty much right after i got it running and then it's going to run every five minutes the way that i've got it set up right now and i don't suggest you do that and i do want to say right up front if you have bandwidth limits like if you have limits of how many how much stuff you can actually move across your network every week or every month or whatever you want to be really careful with something like this because it does move a lot of traffic to try to figure out how fast your speeds actually are and give you a nice average for download and upload so you want to set this really far apart like every 12 hours every 14 hours 24 hours something like that versus every 5 minutes or 10 minutes or 25 minutes or whatever you're looking for for me i think probably like every 30 minutes would be plenty and then if i'm seeing issues in between those times i can always just go out and like actually run a speed test against one of my self-hosted systems on my network something out to the internet and back and make sure you know where is the issue at but if i'm just looking for an average to make sure that i'm getting what i expect i think something like this for every 30 minutes every hour would be great again if you have limits you might want to set that a little bit further apart so you don't use up all your or your bandwidth just trying to run speed tests getting the setup was really really super straightforward which i liked so we're going to go through that here in just a minute and we'll get everything up and running i want to say thank you to all my patrons over at patreon and my subscribers on youtube thank you so much for all of your support i love doing this channel i love making this media and this content for you i hope you enjoy it as well i do post all of the videos now over at patreon after one of my patrons made the suggestion and i don't know why it didn't dawn on me before that but if you're interested in seeing them through patreon and getting notifications through patreon instead of through youtube or hoping that youtube's algorithms happens to show it to you jump over and become a supporter on patreon patreon.com i've got the links in the description and the show notes i appreciate your support thank you so much all right so before we go too far i'm going to show you the one that i've got up and running and it's running actually on this local system that i'm just running as a desktop here and you can see it's run a couple of times now now i do have to go like manually refresh it's not like the dashboard just refreshes on its own and maybe there's a setting in grafana for that i don't i don't know for sure if it has that or not but you can see here i got 480 megabits per second uh down and 23 up and then 110 millisecond ping i think my first run was a little bit better on ping but the the actual download speed was a little slower um not much but maybe it's a little different but you can kind of see here where it's graphing these things out i've got a few runs now that it's done so you can kind of see where it's where it's landing here and then as it continues this will fill up and move along so we'll look at it again after i finish kind of recording and showing you guys how this is set up so what we want to do is come back over here he's got really simple instructions and i'm going to go here i'm going to open up a terminal all right so what we're going to do is we're going to ssh over to the server that i want to run this on full time so i'm going to do ssh and then my server ip address i'm just going to clear this out and first i'm going to do a cd into my docker folder so if you look here this is where i keep all of my docker stuff so it's all together and it's easy for me to move things around i'm going to clear that out and now i'm just going to use some of the commands that he's got here in the background so i'm just going to jump back over to firefox i'm just going to copy this one right here go back into my terminal i'm going to paste that in and it's going to clone down this repository it's pretty small doesn't take any time at all i'm going to cd into that folder and you can see that there's a few files here but if we look at it with ls-al we can see that there's an env example file and a couple of other files that are hidden so first we want to copy that env.sample file so we're just going to do cp.env and then i'll hit tab that will auto complete and i'm just going to call that env.env again now i'm just going to edit that dot env file that we just copied and you can see here there's just a few little values here i'm going to leave this on local according to his documentation this will just pick the best server and the closest server that it can which is fine here you can see the speed test interval is 3 600 seconds i'm going to drop that down to 600 seconds this case it's going to run every 10 minutes if you want every 30 minutes is 1800 if you want every hour it's 3 600 and so on so just take your seconds times however many minutes you want it to run and do that times 60 or if you want it to be seconds times however many hours so if you want 12 hours you do 12 times 3 600 that's how many seconds are in an hour and then you'll have the number of seconds that you need and i think 12 hours like 43 600 seconds or something like that but i'm going to set this to 300 for now and i'll go back and change it and then we're going to set this to port i'm going to just pick a different port because 3000 is really common let's just do 3210 and we'll do save with control o hit enter to confirm and then control x to exit nano now we're going to look at the docker compose file here real quick and you'll see it's pretty straightforward so it's a version 2 influx db it's going to restart on its own if it crashes or anything like that if you restart the server it'll come back up on its own it's going to be influx db 1.8 and then here's the ports i don't have anything running on these ports so i'm just going to leave that alone um the data is in fluxdb this is where it's going to kind of set up this mapped path so it's going to set on the host it's going to be in the current folder and then in a folder called slash data and influx db and then on the on the container side it's going to be slash var slash live slash influx db now if you want to change this location you can change anything to the left side of the colon you should never ever ever mess with the right side of the colon unless you're a developer and you're doing development and you know what you're doing so you can change this path if you want to but this looks fine to me i like it this way because it keeps everything all together inside of my docker folder and then that gets backed up if anything ever happens this system all i do is pull back that back up and just start everything back up it really makes it super simple influx db admin user is admin and then password here so i would suggest absolutely change this password um completely up to you but make sure that you you should you should change this and make it a strong password and you should make it something like p a s s you know w0rd1 exclamation you know something like that you know something strong um you don't want to use a weak password like password but for now we'll leave it but you should really change that okay the db name is going to be speed test and then we're going to go down to the grafana section here so you can see grafana is going to restart as always it's 672. and then here's our volume mapping so again it's going to create a folder called dot slash docker graphana provisioning i don't feel like i actually have to have that uh set up that way so i'm just going to take out the dot slash docker and it can just be grafana it's fine so dot slash grafana provisioning and then it's going to have etsy grafana provisioning and then this here is that port that we set in that emv file so i set that to 3210 so just remember that's what this is it's mapping that to 3000 on the on the container side again you can change the left side you don't need to in this case because it's in the env file but on the right side don't mess with this this is what the container is expecting and again unless you're doing development and you know how to change it and make things expected in a different place you should not change the right side of the colons so this is setting some environment variables here grafana of server root url and then password again is admin or i mean the security admin password is admin again you should change this if you if you really don't want people logging into your stuff make it a strong password um you know you can do something better than that so we'll do password exclamation one it's not a strong password it's not a great password but it's stronger than it was so just remember that we changed it off anonymous enabled true influx db and then we've got restart always for the speed test part and it's going to do this speed test image right here it's going to do speed test as the container name speed test interval is the one that we set and the speed test host we just left it as local which again according to his documentation we'll just pick the closest and best one that we can find as far as the server and then depends on influx db so again we're going to save those changes real quick with control o and then enter to confirm control x to exit and we should be set so here we can do docker hyphen compose up dash d and it's going to go out and it's going to pull down all of those repositories real quick and then we'll check out the ui all right it's up it's running you can see here that it's starting we're going to check out the web page here in just a minute i did have an issue because i didn't think that 8086 was in use on my host and it was so i had to switch that to a different port it gave me this big long error when i first ran it so if you jump into a big long air kind of scroll up and read you know line by line and it'll usually give you an idea of what's going on and i eventually saw the the error that said bind you know zero zero zero zero colon 80 96 or 8086 um is in use so i had to find a port that wasn't in use and set that but this should be about ready for us to go check out our first speed test so i'm going to jump over here into firefox and we're going to go to the ip address of that server and i put the port as 3201 all right so when you come into grafana it doesn't bring you right to that dashboard you have a list of dashboards that you can go check out so what i do is i just click up here and it usually gives you this list so right here is the one we want so we're going to click on speed test results and you can see right here it's already run the first speed test we've got a little point way over here on the right and then 46 millisecond ping 14 megabits per second up 480 down so if we compare that to what we're seeing here and if i refresh we should have another point or two there yeah so we're getting some data here so here you see 480 down 21 up and 79 milliseconds so not much difference you know really if you start looking at these things you'll start seeing a lot of similarities so i've got it running on this host machine here that i'm working on and this is actually running on my server i just want to let it run all the time with all the rest of my docker stuff but there you go it's not too difficult to set up as long as you don't mess up like me and put a port that's already in use you should be good to go it is very quick very straightforward to get set up just double check your your port mappings inside your docker compose file because like i said the influx db port was already in use so i had to switch it to a different port other than that everything is working great and it's very quick to get this set up if you enjoyed this like subscribe tell your friends about it so then come along the journey with us and i want to say that i'm getting together a round table for the end of the year of 2021 and it's going to be with the ibracorp guys and it's going to be with scott over scottabyte and a couple of you guys that have answered and said you wanted to be involved i'm starting to put together what we're going to talk about and getting some timelines set up but i'm hoping to record that here in the next week week and a half and really kind of get that thing ready for you guys for the end of the year i think you'll like it i think you'll enjoy it i think you'll get a lot out of it it's really for the it pros and and it um admins to kind of come in and say here's what i do now and here's why i do it and here's the open source stuff that i use here's the proprietary stuff that i use and here's why i pick those things and really give you guys some great information about that as well so i hope you'll enjoy that i hope you look forward to it and if you're interested in being on it ping me on youtube or ping me on telegram or you can hit me over at discuss.opensourcesawesome.com and i'm always at makin techs so just just hit me up and let me know and i'm sure i can get you in there as well but we're gonna just do a fun round table have some good discussion and hopefully you guys will enjoy that as well and i'll talk to you next time [Music] you
Info
Channel: Awesome Open Source
Views: 1,545
Rating: undefined out of 5
Keywords: open, source, opensource, open-source, self, hosted, selfhosted, self-hosted, free, libre, software, server, web, internet, browser, linux, mac, macos, os x, windows, pi, raspberry, desktop, digitalocean, vps, tutorial, how to, setup, installation, instructions, cli, command line, terminal, interface, open source software, open source news, open source projects, speedtest, speed test, librespeed, open speedtest, openspeedtest, speedof.me, speedtest.net, fast.com, fast, grafana, graph, time series, influxdb, influx
Id: qn_Bw9pE0vs
Channel Id: undefined
Length: 13min 12sec (792 seconds)
Published: Tue Dec 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.