[ Kube 100 ] Getting started with Grafana Loki in Kubernetes

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024
  • In this video, I will show you how to deploy Loki stack in a Kubernetes cluster and start collecting logs in a central place. The stack will container Loki as the logs storage engine, Promtail as the logs collection agent and Grafana for visualization.
    Loki Documentation:
    grafana.com/do...
    LogQL:
    grafana.com/do...
    📺 Learn Kubernetes Playlist:
    • Learn Kubernetes
    Hope you enjoyed this video. Please share it with your friends and don't forget to subscribe to my channel. For any questions/issues/feedback, please leave me a comment and I will be happy to help.
    👏 Thanks for watching.
    💗 If you wish to support me:
    www.paypal.com...

Комментарии • 153

  • @dannykopping
    @dannykopping 2 года назад +4

    Loki maintainer here, great job on the video!

  • @BemusedSoliloquy
    @BemusedSoliloquy 2 года назад +3

    You are a very sharp cookie, I was impressed not even one minute into the video. Your tip of saving out the chart values for reference has accelerated my progress immensely, I don't know why but I had gravitated towards using --set to get things done, no more, tyvm :D

    • @justmeandopensource
      @justmeandopensource  2 года назад

      Hi Derek, thanks for watching. I am used to using values file :)

  • @JohnMatthew1
    @JohnMatthew1 Год назад +2

    Thank you so much for your video, it really helped me get Loki running with my Prometheus installation!

  • @fuliaamiya
    @fuliaamiya 5 месяцев назад +1

    Very straight and specific to solution but details. It is really helpful.

  • @leopoldobarreiro9766
    @leopoldobarreiro9766 3 года назад +3

    Venkat always bringing great tech contents. Thanks a lot.

  • @mr.cybernetyc7292
    @mr.cybernetyc7292 3 года назад +3

    You knew it :))
    I was searching for this info regarding loki , thnx man , much appreciated it.

  • @teknikalyfit
    @teknikalyfit 3 года назад +1

    With this video, I have learned a huge amount of valuable information. Thanks bro.

  • @kamrulahsan06
    @kamrulahsan06 3 года назад +2

    Thanks a lot Venkat. Much needed.

  • @MrKumargopalan
    @MrKumargopalan Год назад +1

    Hi Venkat, excellent video. It was very helpful. Keep doing more videos.

  • @danielmarques433
    @danielmarques433 2 года назад +1

    Thank you. I always learn a lot from you.

  • @giarc1988
    @giarc1988 3 года назад +4

    This is an amazing tutorial. Bravo and thanks

  • @chandunallani6283
    @chandunallani6283 3 года назад +1

    Superb content and straight forward

  • @Tikhon_FaiR
    @Tikhon_FaiR 2 года назад +2

    Thank you for the guide!)

  • @kevinyu9934
    @kevinyu9934 3 года назад +1

    Thanks for the great content. Really appreciated it.

  • @cezaralmeida1564
    @cezaralmeida1564 2 года назад +1

    Thanks for this great content! Congrats!

  • @gouterelo
    @gouterelo 3 года назад +1

    Great video Venkat ! Im trying to send to a external grafana the loki service ! thanks again for all the videos !

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Thanks for watching. You can just add the lok datasource in your external Grafana provided you expose loki outside the cluster and that grafana can reach it. Cheers.

  • @suchithreddy733
    @suchithreddy733 6 месяцев назад +1

    Thanks a lot. You saved my day :)

  • @kanwalnainsingh
    @kanwalnainsingh 2 года назад +1

    Fantastic video.

  • @julianomoraisbarbosa
    @julianomoraisbarbosa 3 года назад +1

    Cool !!!
    Content of great relevance !!!

  • @sathishkumarnce
    @sathishkumarnce 8 месяцев назад +1

    Life saver, Thanks a lot

  • @danzino21
    @danzino21 Год назад +1

    Thank you very much 👍

  • @杨树林-r1m
    @杨树林-r1m 2 года назад +1

    great!! many thanks to you!

  • @nacholibre4530
    @nacholibre4530 3 года назад +1

    great content as usual, thanks!

  • @rmnobarra
    @rmnobarra 3 года назад +1

    Another amazing video, Mr Venkat. Would be awesome a traefik v2 video.

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      I have already prepared for Traefik v2. Just need to record it. Will do it soon. Cheers.

    • @rmnobarra
      @rmnobarra 3 года назад +1

      @@justmeandopensource Venkat, The only one!! :)

  • @devmrtcbk
    @devmrtcbk 3 года назад +1

    thank you Venkat

  • @bharathmc7964
    @bharathmc7964 2 года назад +1

    It's very helpful and to the point. Thanks.
    If possible, can you please make a small demo of "Simple scalable deployment of Grafana Loki ", which is latest and as loki-stack is mostly depreciated and could not find the official documentation as well.

    • @justmeandopensource
      @justmeandopensource  2 года назад +1

      Hi, thanks for watching. Why do you think loki-stack is deprecated? The chart is still maintained in grafana helm repository. I can certainly do a video on simple scalable deployment. I will try and record in the coming weeks. Cheers.

  • @coppyphommin9337
    @coppyphommin9337 2 года назад +1

    Oh Thank you.

  • @wva5089
    @wva5089 2 года назад +1

    Thanks. (hopefully this comment shows interaction with your vids and gets you more views)

  • @skycomandor
    @skycomandor 2 года назад +1

    you the best

  • @liorco300
    @liorco300 3 года назад

    Thanks great video

  • @nikhilpatel4278
    @nikhilpatel4278 3 года назад +2

    That was awesome! Thank You. Can you please also make some video series on securing Kube API servers with Oauth & OIDC.

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      I have that in my list. Let me see if I get some time to explore that. Cheers.

    • @sandeepmishal2376
      @sandeepmishal2376 3 года назад +1

      Hi Venkat..
      It would great if you do for both in house cluster as well as cloud provided managed k8 cluster where one don't have access to the control plane..
      Once again it's a great work
      Thanks again

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      @@sandeepmishal2376 Thanks for watching. I mostly cover the concept in a more generic way and let people explore further. I know people are not going to be running clusters on their laptop in the real world. But I won't be able to cover all the scenarios. Some might be interested in gke and other eks etc. But I will keep this in mind. Cheers.

    • @sandeepmishal2376
      @sandeepmishal2376 3 года назад +1

      Thanks Venkat.. I understood..
      May be I could have been more specific to my comment and not confused you..
      I was stating it for SSO using oidc topic where it can become a bit tricky as we will not have access to control plane . Sry for the confusion
      I love the generic way it self..

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      @@sandeepmishal2376 Ah okay. Now it makes sense as to why you replied in this thread. Cheers.

  • @Ajmalkhalil-cx4gf
    @Ajmalkhalil-cx4gf 6 месяцев назад

    Hello, I have setup the grafana/loki stack similar way you did. Now in grafana dashboards i am trying to create dashboard for individual pods and i am able to do it. But when i am restarting the pods, pods name gets changed. Now i am not getting any logs on dashboard. I am not sure if its the correct way of setting the dashboard i.e individual dashboards.
    or i just need to setup logs for namespaces only? would be grateful for your help

  • @sunnynehar
    @sunnynehar 3 года назад +1

    Hi Venkat, your videos are just mind-blowing, want to ask about any upcoming videos on Grafan Tempo?

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      Hi Gordis, many thanks for watching. I haven't explored Grafana Tempo. I can add it to my list and I am going through my user requested videos list at the moment.

  • @networkfreddy2000
    @networkfreddy2000 3 месяца назад

    Nice!

  • @bmanikantareddy
    @bmanikantareddy 2 года назад +1

    what is the browser you are using for demos. I can see some tabs and running commands for opening the URLs

    • @justmeandopensource
      @justmeandopensource  2 года назад

      I use Qutebrowser as my web browser on Arch Linux. This browser is python based and keyboard driven. You will find it extremely useful if you are a keyboard centric person and VIM user.

    • @justmeandopensource
      @justmeandopensource  2 года назад

      www.qutebrowser.org/

  • @Pyrusmalus
    @Pyrusmalus 3 года назад +1

    Thanks 😊

  • @himansusekharmishra5114
    @himansusekharmishra5114 2 года назад

    Thank you for this amazing video. I have a question that I have a customize storage class of type gp2 along with PV and PVC , so shall I need to mention the PV and PVC in the Loki yaml file or the storage class name will be sufficient enough for the yaml.

  • @javisartdesign
    @javisartdesign 3 года назад +1

    awesome thanks!

  • @pavankumarnalajala2678
    @pavankumarnalajala2678 2 года назад +1

    Please make videos on Splunk for monitoring of k8s.

  • @aaslanli3943
    @aaslanli3943 3 года назад +1

    Thanks for this good jobs

  • @rc3043
    @rc3043 2 года назад

    This explanation was awesome!
    I saw your logs have also this prefixed metadata:
    `stderr` before the real log the JSON.
    How can you remove this so loki will recognize the json properties correctly!? If you use for example fluent bit instead of Promtail?

  • @ehtishamrajput3597
    @ehtishamrajput3597 11 месяцев назад

    I’ve grafana loki stack running on my local docker desktop k8s , i’m integrating it with GitHub Oauth, what root url and callback url should i set, I’m getting mismatch redirect

  • @student_voice
    @student_voice Год назад

    Hey i have setup a Dashboard for App logs in Grafana - Loki.
    Logs are coming but there is an error showing "LogfmtParserErr"
    The actual error looks like this:
    __error__ : LogfmtParserErr

  • @HDGlazaa
    @HDGlazaa 2 года назад +1

    Can you tell me how to change config file for loki ? for example set max_query_series = 1000 ( dafault is 500 ) in kubernetes

  • @mahfoudissam1285
    @mahfoudissam1285 3 года назад +1

    hi thanks for this guide,but how can i display all the namespaces of the cluster,because loki display only some namespaces to me in the grafana dashboard

    • @mahfoudissam1285
      @mahfoudissam1285 3 года назад

      hi thanks you ,i have found the answer , there was any logs to display in the other namespaces

  • @guillermobarroso1139
    @guillermobarroso1139 Год назад +1

    Nice

  • @mzw8374
    @mzw8374 3 месяца назад

    When tried to setup data source for loki, it was unable to connect to loki service. Can you please help for solve this?

  • @MIRISU2
    @MIRISU2 3 года назад +1

    Hi! Many thanks for that video! I have one question. I've installed loki and grafana. But I don't see how to expand log line and find out more details of log item.

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Thanks for watching. Do you mean in Grafana that you can't see the full log item? I am not sure if loki truncates the log item. I would be surprised if it does that and there is no configuration to control that behaviour.

  • @Thirumalesh100
    @Thirumalesh100 2 года назад

    Great content, I could able to deploy Loki for our use case by referring this video. Thanks . I am also looking out the way to get the logs using Loki API for given pod

  • @yashshah111
    @yashshah111 Год назад

    Great tutorial! Is there any way you could make an updated tutorial on this? Can you also touch upon their Grafana Cloud offering versus using the open source community version?

  • @kranteshshrestha361
    @kranteshshrestha361 Год назад

    Hello can you please make a video for setting up log retention period in loki stack. As i have tried to set the parameter according to documentation but doesn't retain the log according to set period.

  • @malcolmserrao8721
    @malcolmserrao8721 2 года назад +1

    nice explanation, i have a question, if i need to configure logging on multiple kubernetes clusters can i use a single grafana instance for viewing the loki logs from different clusters?, appreciate your help

    • @justmeandopensource
      @justmeandopensource  2 года назад

      Hi Malcolm, thanks for watching. Yes that set up is entirely possible. You can have all logging stuff (like prometheus, grafana etc) on a separate cluster and configure ingress routes so that they can be connected from agents on other clusters.

    • @malcolmserrao8721
      @malcolmserrao8721 2 года назад +1

      @@justmeandopensource thank you very much for the quick reply

    • @justmeandopensource
      @justmeandopensource  2 года назад

      @@malcolmserrao8721 no worries

  • @Sony-il2ti
    @Sony-il2ti 2 года назад

    deploy Loki in my cluster using helm but promtail was not deployed to the bare metal servers, how do i get it deployed on them too?

  • @sumanniroula3497
    @sumanniroula3497 3 года назад

    Thanks for the video. I followed the steps but 'Explore' page is empty for me even though loki data source is added. While checking the Javascript console, I see "Datasource named Prometheus was not found". Can you help?

  • @pawansolanki20095
    @pawansolanki20095 3 года назад

    Hi , Venkat . Very informatic video. Which logging soultion you will suggest in production for cluster having more than 50 nodes?

  • @tamilan_editzz
    @tamilan_editzz Год назад

    Hey hi, actually im using xk6 for sending logs to loki, is it possible to send our own messages to loki like " This is loki test by chandru" Message?

  • @dattak2625
    @dattak2625 3 года назад

    Thank you for all your wonderful videos, I have a query regarding logs, can we use loki to monitor application specific logs, if not would you suggest any tools for application specific? Thank you.

  • @pisckipratama9529
    @pisckipratama9529 2 года назад +1

    Hi Venkat, thank you for informatic video.
    I'm deploying it with grafana disabled, and how do I update the grafana enabled without deleting the configured?

    • @justmeandopensource
      @justmeandopensource  2 года назад

      Hi Piscki, thanks for watching. I am not sure if I understood your question correctly. Can you elaborate your requirement please? Thanks.

    • @pisckipratama9529
      @pisckipratama9529 2 года назад +1

      @@justmeandopensource so i have deployed loki-stack with grafana disabled, but i want to change it to enable, is it possible without running "helmet uninstall" command?

    • @justmeandopensource
      @justmeandopensource  2 года назад

      @@pisckipratama9529 Ah okay. You should be able to change most of the stuff without uninstalling.
      For example, as shown in this video, if you checked out the values of the chart with "helm show values" to a local file and used that in helm install command with --values option, then you can edit that values file, enable grafana and run "helm upgrade --install --values ". I haven't tried it in this case but I know it worked for me in the past. However there are certain stuff in the values file that you can update on live deployment. You will have to helm uninstall it first and deploy again.

    • @pisckipratama9529
      @pisckipratama9529 2 года назад +1

      @@justmeandopensource ohh okay Venkat, thanks for the good explanation

    • @justmeandopensource
      @justmeandopensource  2 года назад

      You are welcome.

  • @dattak2625
    @dattak2625 3 года назад

    Hi, I am getting 502 bad gateway error, when I test data source in grafana, can you help me with this, my setup is with kubeadm on aws and it's single node, I am accessing grafana with nodeport.

  • @carmilocabigon6233
    @carmilocabigon6233 Год назад

    Hi, can you do a video on how to add additional config to get logs for a custom application? What configs do we need to edit, is it the configmap for the created promtail service?

  • @Dheerajpant5211
    @Dheerajpant5211 3 года назад +1

    Thanks for the explanation, is there any way that grafana can send full information of logs in email as alert, we are getting alert but it is only giving count, if there any way to get full information of log in email?

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Hi, thanks for watching. You could use alert manager and configure it to your liking.

  • @manidevops8501
    @manidevops8501 3 года назад +1

    Thanks for such a wonderful video. I'll really enjoyed the way explained.
    Can we do log rotation in LOKI? bcoz, in my production environment the EBS volume is getting filled with lots of logs. if i want to delete the logs which is 10 days older, how will i do that with loki?

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      Thanks for watching. You have to configure retention settings in storage configuration.
      grafana.com/docs/loki/latest/operations/storage/retention/

    • @manidevops8501
      @manidevops8501 3 года назад +1

      @@justmeandopensource thank you so much..........

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      You are welcome.

  • @amarchand6981
    @amarchand6981 2 года назад +1

    Which shell are you using?

    • @justmeandopensource
      @justmeandopensource  2 года назад

      Zsh along with some goodies which I have explained in this video if you would like to watch.
      ruclips.net/video/PUWnCbr9cN8/видео.html

  • @pjj7466
    @pjj7466 7 месяцев назад

    Bro can you please make another video with latest loki monolithic setup and microservices loki setup on kubernetes please?

  • @vikasp1262
    @vikasp1262 3 года назад +1

    Thanks a lot, how can i make alerts if any pod having error in logs

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Thanks for watching. You have to use alertmanager for that I guess. Haven't tried it myself.

  • @evgeniyburovnikov656
    @evgeniyburovnikov656 3 года назад +1

    Thank you so much for the video, it was very helpful for me. I would also be very grateful if someone could tell me how to get the loki, promtoil configuration files after installation???

  • @bharatarya7929
    @bharatarya7929 Год назад

    Hi!
    How to handle archiving of logs

  • @ChristianAltamiranoAyala
    @ChristianAltamiranoAyala 3 года назад

    Nice tutorial, Did you test the query performace with a large mount of data? If so, Is loki more performant than EFK?

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Hi Chris, thanks for watching. I haven't tested the performance with large dataset. But according to them, it should perform better than Elasticsearch as it doesn't have the index overhead.

  • @soukhyabhat9588
    @soukhyabhat9588 3 года назад

    Hi Venkat,Can you Please give me yaml file for adding S3 bucket as storage .Have tried many ways but nothing is working .It would be great if you could help

  • @2mahender
    @2mahender 9 месяцев назад

    thank you, can you let me know how to setup alerts for loki stack

    • @justmeandopensource
      @justmeandopensource  9 месяцев назад

      Hi, Thanks for watching. I haven't tried it myself but here is the documentation that might be helpful.

  • @ViacheslavHudzovskyi
    @ViacheslavHudzovskyi Год назад

    up!

  • @sealedd
    @sealedd 2 года назад +1

    No need to setup a PersistentVolumeClaim?

    • @justmeandopensource
      @justmeandopensource  2 года назад

      It all comes from helm chart. No need to setup pvc but you should have automated volume provisioning in your cluster.

  • @bunnyzero9125
    @bunnyzero9125 2 года назад

    Hi can anyone tell me how to get MySQL server query logs to Loki grafana dashboard,
    Mysql query logs are in pod container (opt/bitnami/MySQL/logs/query.log ) i want this logs which are in this pod container location to show displayed in Loki grafana dashboard can anyone here guide through this

  • @shamanthreddy8154
    @shamanthreddy8154 Год назад

    Can You do a fluentd with loki and Amazon managed grafana

  • @Ariel-om1lt
    @Ariel-om1lt 3 года назад +1

    requesting for Grafana tempo too :)

  • @LakshmiCharanTangisettiTangise
    @LakshmiCharanTangisettiTangise 8 месяцев назад +1

    how to download these logs

    • @justmeandopensource
      @justmeandopensource  8 месяцев назад

      Hi, thanks for watching. I am not sure why you would want to download the logs. Its because you wanted to retain the logs from various applications, you have deployed Loki and storing logs in there where you can query and visualize stuff.
      If you want to download logs, you will have to write a query and store the output in a file. Hope this helps.

  • @bobbyhamel4345
    @bobbyhamel4345 3 года назад +1

    I don't understand why you would skip setting up an ingress, in a real production env you wouldn't use port forwarding... All tutorials related to Loki fail to acknowledge the ingress.

  • @YongUnHeo
    @YongUnHeo 3 года назад +1

    good job man!
    i want use nodeport service on loki-stack-grafana.
    teach me edit option.
    tmp/loki-stack-values.yaml

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Thanks for watching. I will try it out and if possible do a follow up video to this one. Cheers.

  • @ervikasrastogi
    @ervikasrastogi 2 года назад

    Hi....I have loki promtail and grafana setup and want to see grafana usage per user with dashboard from grafana.log..I have referer label in logs which is having dashboard name along with https url but i only want to show dashboards accessed userwise..can you please help me for same?