How To View Your Strava Data in Grafana - Easy Setup - Kubernetes Homelab
Read full transcript 9 segments
-
hello good people of YouTube welcome hello good people of YouTube welcome back to my channel and I'm so glad that back to my channel and I'm so glad that back to my channel and I'm so glad that I have finally found an an actual use of I have finally found an an actual use of I have finally found an an actual use of setting up a home lab and running a setting up a home lab and running a setting up a home lab and running a kubernetes cluster at home uh all the kubernetes cluster at home uh all the kubernetes cluster at home uh all the time because I finally figured out time because I finally figured out time because I finally figured out something that I can that actually something that I can that actually something that I can that actually brings value to my to my life except for brings value to my to my life except for brings value to my to my life except for Learning and developing myself as a Learning and developing myself as a Learning and developing myself as a professional uh Cloud engineer um but professional uh Cloud engineer um but professional uh Cloud engineer um but but the thing is that I'm I'm a runner I but the thing is that I'm I'm a runner I but the thing is that I'm I'm a runner I started running in February and it's started running in February and it's started running in February and it's December now so that's almost a year of December now so that's almost a year of December now so that's almost a year of running I have ran I ran about 850 running I have ran I ran about 850 running I have ran I ran about 850 kilometers this year which is crazy to kilometers this year which is crazy to kilometers this year which is crazy to me and I use straa to keep track of my me and I use straa to keep track of my me and I use straa to keep track of my metrics and straa has a pretty neat app metrics and straa has a pretty neat app metrics and straa has a pretty neat app on your phone uh but of course like on your phone uh but of course like on your phone uh but of course like everything else you have to do a paid everything else you have to do a paid everything else you have to do a paid subscription to get access to all of the subscription to get access to all of the subscription to get access to all of the data turns out straa has has a it's an data turns out straa has has a it's an data turns out straa has has a it's an API and it's free and all your data is API and it's free and all your data is API and it's free and all your data is accessible in it so I figured out a way accessible in it so I figured out a way accessible in it so I figured out a way to um get it into grafana actually I to um get it into grafana actually I to um get it into grafana actually I didn't figure it out I just discovered didn't figure it out I just discovered didn't figure it out I just discovered that there it's very easy there are that there it's very easy there are that there it's very easy there are plugins to do this uh and I was super plugins to do this uh and I was super plugins to do this uh and I was super excited about this so uh I thought I excited about this so uh I thought I excited about this so uh I thought I would make a video and see um share with would make a video and see um share with would make a video and see um share with you how I how I did it uh I did it this you how I how I did it uh I did it this you how I how I did it uh I did it this morning and now I set up the cluster uh morning and now I set up the cluster uh morning and now I set up the cluster uh again and now I'm going to do it on
-
again and now I'm going to do it on again and now I'm going to do it on video so I have a Rancher cluster video so I have a Rancher cluster video so I have a Rancher cluster running on my MacBook here running on my MacBook here running on my MacBook here and as you see it has been up for one and as you see it has been up for one and as you see it has been up for one and a half hours I just installed a and a half hours I just installed a and a half hours I just installed a fresh Prometheus and grafana stack on it fresh Prometheus and grafana stack on it fresh Prometheus and grafana stack on it that's the previous video I made this that's the previous video I made this that's the previous video I made this morning so it's available on my channel morning so it's available on my channel morning so it's available on my channel if you want to see that but for now I'm if you want to see that but for now I'm if you want to see that but for now I'm going to assume that you have Gra going to assume that you have Gra going to assume that you have Gra running on your cluster already or in running on your cluster already or in running on your cluster already or in grafana cloud and um you have the port grafana cloud and um you have the port grafana cloud and um you have the port forwarding or some sort of Ingress ready forwarding or some sort of Ingress ready forwarding or some sort of Ingress ready so that you can access your grafana in so that you can access your grafana in so that you can access your grafana in the browser so as you see I'm accessing the browser so as you see I'm accessing the browser so as you see I'm accessing it by Local Host it by Local Host it by Local Host 3000 and this is this is my local 3000 and this is this is my local 3000 and this is this is my local grafana instance running on my grafana instance running on my grafana instance running on my laptop so I will be adding this link to laptop so I will be adding this link to laptop so I will be adding this link to the documentation in my notes as well the documentation in my notes as well the documentation in my notes as well for the video but here it is a very for the video but here it is a very for the video but here it is a very straightforward simple manual how to do straightforward simple manual how to do straightforward simple manual how to do it you go to the straa settings API and it you go to the straa settings API and it you go to the straa settings API and create an app so that's where I am now create an app so that's where I am now create an app so that's where I am now it asks you to upload an icon so I will it asks you to upload an icon so I will it asks you to upload an icon so I will just um upload something that I have just um upload something that I have just um upload something that I have here this is a logo for a blog post that here this is a logo for a blog post that here this is a logo for a blog post that I uh wrote I uh wrote I uh wrote recently and here we go we have a Strava recently and here we go we have a Strava recently and here we go we have a Strava application and it shows the secrets application and it shows the secrets application and it shows the secrets so I will be uh then I will be adding
-
so I will be uh then I will be adding so I will be uh then I will be adding the straa data source to grafana and for the straa data source to grafana and for the straa data source to grafana and for that you will need to install a plug-in that you will need to install a plug-in that you will need to install a plug-in if I'm not mistaken I might have to if I'm not mistaken I might have to if I'm not mistaken I might have to fiddle around a bit to do it but you go fiddle around a bit to do it but you go fiddle around a bit to do it but you go to I'm logged in as an admin and then to I'm logged in as an admin and then to I'm logged in as an admin and then you see the connections here and then you see the connections here and then you see the connections here and then you go to data you go to data you go to data sources and here you can do add new data sources and here you can do add new data sources and here you can do add new data source and if you search for source and if you search for source and if you search for straa it is not there so ah see what I did I clicked add new so ah see what I did I clicked add new connection here not data source but add connection here not data source but add connection here not data source but add new connection search for straa and then new connection search for straa and then new connection search for straa and then you click straa and here you get the you click straa and here you get the you click straa and here you get the option to install it in your local option to install it in your local option to install it in your local grafana instance so let's do grafana instance so let's do grafana instance so let's do that and here it's already showing an that and here it's already showing an that and here it's already showing an example of what you can do it's it's so example of what you can do it's it's so example of what you can do it's it's so cool and it is installed then we add the cool and it is installed then we add the cool and it is installed then we add the new data source and now we will be new data source and now we will be new data source and now we will be adding the credentials that we have here adding the credentials that we have here adding the credentials that we have here so you have to copy over the client so you have to copy over the client so you have to copy over the client ID paste it ID paste it ID paste it in then go to the client secret I will in then go to the client secret I will in then go to the client secret I will generate a new one after this video generate a new one after this video generate a new one after this video obviously so you don't have to try to um obviously so you don't have to try to um obviously so you don't have to try to um hack me come at me bro so then you do hack me come at me bro so then you do hack me come at me bro so then you do connect with straa and you have to connect with straa and you have to connect with straa and you have to authorize your application so you have authorize your application so you have authorize your application so you have to do
-
to do to do this and annoyingly you have to put in this and annoyingly you have to put in this and annoyingly you have to put in the credentials again so just do that the credentials again so just do that the credentials again so just do that copy over the client ID again here we again here we go and we do save and test and the data source is working yay test and the data source is working yay so it's saved I'm so it's saved I'm so it's saved I'm authenticated and um then I had to authenticated and um then I had to authenticated and um then I had to search around for a bit but uh straa search around for a bit but uh straa search around for a bit but uh straa actually comes with with the dashboards actually comes with with the dashboards actually comes with with the dashboards already so it has this nice little list already so it has this nice little list already so it has this nice little list of dashboards and you can just uh import of dashboards and you can just uh import of dashboards and you can just uh import them like them like them like this import import import so now they're this import import import so now they're this import import import so now they're all ready uh all ready uh all ready uh imported and if you then go back to your imported and if you then go back to your imported and if you then go back to your dashboards dashboards dashboards you will see all these fancy straa you will see all these fancy straa you will see all these fancy straa dashboards here so you can uh let's go dashboards here so you can uh let's go dashboards here so you can uh let's go to the athlete to the athlete to the athlete dashboard and here we go here we have a dashboard and here we go here we have a dashboard and here we go here we have a summary of my activities of the last summary of my activities of the last summary of my activities of the last month like isn't this cool like how how month like isn't this cool like how how month like isn't this cool like how how easy was this how easy was easy was this how easy was easy was this how easy was this now I have my grafana my straa data this now I have my grafana my straa data this now I have my grafana my straa data in grafana and this is so awesome in grafana and this is so awesome in grafana and this is so awesome awesome this means I can start building awesome this means I can start building awesome this means I can start building a personal dashboard for myself I like I a personal dashboard for myself I like I a personal dashboard for myself I like I want to have a URL where I have where I
-
want to have a URL where I have where I want to have a URL where I have where I put in um a few panels like for example put in um a few panels like for example put in um a few panels like for example the weather a quote and uh maybe the the weather a quote and uh maybe the the weather a quote and uh maybe the total distance I ran this week for total distance I ran this week for total distance I ran this week for example I can do so many fun things with example I can do so many fun things with example I can do so many fun things with this and keep really keep track of my this and keep really keep track of my this and keep really keep track of my progress so I'm super happy I discovered progress so I'm super happy I discovered progress so I'm super happy I discovered this so let's see we have uh this uh this so let's see we have uh this uh this so let's see we have uh this uh overview overview overview dashboard then we have a few more we dashboard then we have a few more we dashboard then we have a few more we have activity analysis for example so have activity analysis for example so have activity analysis for example so let's do an afternoon let's do an afternoon let's do an afternoon run run run and uh I will just put this and uh I will just put this and uh I will just put this to let's to let's to let's see last five minutes for example and see last five minutes for example and see last five minutes for example and here you have I have this run and here I here you have I have this run and here I here you have I have this run and here I see how my heart rate developed during see how my heart rate developed during see how my heart rate developed during this run and my speed for example um this run and my speed for example um this run and my speed for example um that's for single that's for single that's for single activities you have an activity activities you have an activity activities you have an activity overview where you can pick a lunch this overview where you can pick a lunch this overview where you can pick a lunch this is a lunch run that I did so you here is a lunch run that I did so you here is a lunch run that I did so you here you see the the watch and it it is you see the the watch and it it is you see the the watch and it it is basically what you would see in the basically what you would see in the basically what you would see in the mobile app but now you have this you can mobile app but now you have this you can mobile app but now you have this you can access it via the web UI it's much more access it via the web UI it's much more access it via the web UI it's much more accessible and yeah working as a cloud accessible and yeah working as a cloud accessible and yeah working as a cloud native engineer this is of course very native engineer this is of course very native engineer this is of course very familiar territory but but the best familiar territory but but the best familiar territory but but the best thing thing thing is you have all your data accessible is you have all your data accessible is you have all your data accessible so to my knowledge on a free so to my knowledge on a free so to my knowledge on a free subscription there is currently no way
-
subscription there is currently no way subscription there is currently no way to view the to view the to view the average distance you ran per week for an average distance you ran per week for an average distance you ran per week for an entire year you can only see a few entire year you can only see a few entire year you can only see a few months back but you can't actually see months back but you can't actually see months back but you can't actually see it far back so the best thing is that it far back so the best thing is that it far back so the best thing is that you can go to your um explore here you can go to your um explore here you can go to your um explore here and you if you pick the Strava data and you if you pick the Strava data and you if you pick the Strava data source then you can start playing around source then you can start playing around source then you can start playing around with your data so let's do that let's with your data so let's do that let's with your data so let's do that let's query the query the query the activities and I want to see only my activities and I want to see only my activities and I want to see only my runs I want to put them as a Time runs I want to put them as a Time runs I want to put them as a Time series and uh let's do the series and uh let's do the series and uh let's do the distance and of course you have to distance and of course you have to distance and of course you have to adjust adjust adjust the the time so grafana is only now the the time so grafana is only now the the time so grafana is only now seeing activities that were logged six seeing activities that were logged six seeing activities that were logged six hours ago and I ran a day ago so that's hours ago and I ran a day ago so that's hours ago and I ran a day ago so that's uh you won't see anything but let's go uh you won't see anything but let's go uh you won't see anything but let's go back six back six back six months and just wait for it to load a months and just wait for it to load a months and just wait for it to load a bit and here you go here you bit and here you go here you bit and here you go here you see if I press weak here you see the see if I press weak here you see the see if I press weak here you see the distance that I ran every week for the distance that I ran every week for the distance that I ran every week for the past 6 months like this is so so nice past 6 months like this is so so nice past 6 months like this is so so nice and now you can start building things and now you can start building things and now you can start building things you can do average per day you can ah you can do average per day you can ah you can do average per day you can ah this is just amazing per hour this is just amazing per hour this is just amazing per hour even and well let's let's run with this
-
even and well let's let's run with this even and well let's let's run with this so I have the average distance per so I have the average distance per so I have the average distance per week week week and uh let's see I if I want to create and uh let's see I if I want to create and uh let's see I if I want to create put this in a custom dashboard that I'm put this in a custom dashboard that I'm put this in a custom dashboard that I'm building so I have this here sure run the query and then we can do sure run the query and then we can do add to add to add to dashboard and I'll create a new dashboard and I'll create a new dashboard and I'll create a new dashboard open it I'll give the dashboard open it I'll give the dashboard open it I'll give the dashboard a name dashboard a name dashboard a name um total distance per week save week save that and let's go and edit this that and let's go and edit this that and let's go and edit this panel first of all we have have to put panel first of all we have have to put panel first of all we have have to put it on the last six months or a year for it on the last six months or a year for it on the last six months or a year for that that that matter let's do one year why matter let's do one year why matter let's do one year why not and let's edit the not and let's edit the not and let's edit the panel so here I have my panel I can give panel so here I have my panel I can give panel so here I have my panel I can give it a title distance per it a title distance per it a title distance per week and I can also just um adjust the style of this so you can um adjust the style of this so you can feel the thing like this make make it feel the thing like this make make it feel the thing like this make make it look pretty you look pretty you look pretty you can uh choose how you want to feel like can uh choose how you want to feel like can uh choose how you want to feel like this you can adjust the width of the this you can adjust the width of the this you can adjust the width of the lines and you want to connect the null
-
lines and you want to connect the null lines and you want to connect the null values and now you have something nice values and now you have something nice values and now you have something nice here so I have a very beautiful overview here so I have a very beautiful overview here so I have a very beautiful overview of the progression of how I've been of the progression of how I've been of the progression of how I've been running in the weeks so as you see here running in the weeks so as you see here running in the weeks so as you see here I built up really well uh until the I built up really well uh until the I built up really well uh until the summer Su then I went on summer vacation summer Su then I went on summer vacation summer Su then I went on summer vacation where I hiked for 150 km but I didn't do where I hiked for 150 km but I didn't do where I hiked for 150 km but I didn't do any running so I had to build it up any running so I had to build it up any running so I had to build it up again then I got an injury and I had to again then I got an injury and I had to again then I got an injury and I had to build it up again and so here you can build it up again and so here you can build it up again and so here you can see the trajectory so this is why it's see the trajectory so this is why it's see the trajectory so this is why it's so powerful you can start building your so powerful you can start building your so powerful you can start building your own custom things what you want to see I own custom things what you want to see I own custom things what you want to see I want to see the stuff that I the how want to see the stuff that I the how want to see the stuff that I the how much I ran per week so I can start try much I ran per week so I can start try much I ran per week so I can start try beating myself and uh and I want to have beating myself and uh and I want to have beating myself and uh and I want to have that available in my web browser another that available in my web browser another that available in my web browser another one is uh let's go explore and let's do one is uh let's go explore and let's do one is uh let's go explore and let's do a distance per day and I'll do it for a distance per day and I'll do it for a distance per day and I'll do it for the last seven the last seven the last seven days uh last seven days uh last seven days uh last seven days and for the Run activity so now I days and for the Run activity so now I days and for the Run activity so now I have a nice little overview of how I've have a nice little overview of how I've have a nice little overview of how I've been doing this week so I ran four times been doing this week so I ran four times been doing this week so I ran four times and one was six one was 7 and A2 and and one was six one was 7 and A2 and and one was six one was 7 and A2 and then was eight and a half so I can make then was eight and a half so I can make then was eight and a half so I can make a dashboard for myself where I always a dashboard for myself where I always a dashboard for myself where I always see what I did and how I'm doing that see what I did and how I'm doing that see what I did and how I'm doing that week this is really powerful for for week this is really powerful for for week this is really powerful for for someone like me who likes to have these someone like me who likes to have these someone like me who likes to have these things visually um this is just very things visually um this is just very things visually um this is just very powerful and I just can't wait to start
-
powerful and I just can't wait to start powerful and I just can't wait to start building up some sort of web app that building up some sort of web app that building up some sort of web app that integrates this so yeah I finally found integrates this so yeah I finally found integrates this so yeah I finally found a practical use for running a kubernetes a practical use for running a kubernetes a practical use for running a kubernetes cluster I finally found an excuse to cluster I finally found an excuse to cluster I finally found an excuse to start buying some hard we and some start buying some hard we and some start buying some hard we and some raspberry pies and um I can start raspberry pies and um I can start raspberry pies and um I can start building from here on out so I hope this building from here on out so I hope this building from here on out so I hope this was useful to you and uh let me know how was useful to you and uh let me know how was useful to you and uh let me know how did it go for you and maybe you even did it go for you and maybe you even did it go for you and maybe you even want to share your creations with me all want to share your creations with me all want to share your creations with me all right have a good day and see you in the right have a good day and see you in the right have a good day and see you in the next one next one next one byebye
Summary
The main theme is leveraging a home Kubernetes cluster to extract and visualize personal data. Specifically, the speaker found a practical use for their home lab by connecting to Strava's free API to pull running metrics into Grafana. The takeaway is that by utilizing readily available plugins and free APIs, even complex home lab setups can be used for valuable personal data insights.