Promtail Loki Grafana Using Docker Compose | Grafana Loki Demo

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 30

  • @JC.72
    @JC.72 2 ปีที่แล้ว +1

    is there a way to do alerts with logs like this? e.g. if any log has the "ERROR" words it will fire up an alert and notify.

    • @Thetips4you
      @Thetips4you  2 ปีที่แล้ว

      Yes should be possible.

  • @apekshaagrawal713
    @apekshaagrawal713 ปีที่แล้ว +1

    not sure why getting this error while trying to run the services
    "failed parsing config: /promtailloki/loki/loki-config.yaml does not exist, set
    config.file for custom config path".
    Can u please help me with this?
    I have my folder structure same as that you have.

    • @Thetips4you
      @Thetips4you  ปีที่แล้ว +1

      Check file path is correct.

  • @ninoponchev
    @ninoponchev 3 ปีที่แล้ว

    Could the same configuration be done in Windows? And how do you send logs to loki? Thanks a lot!

    • @Thetips4you
      @Thetips4you  3 ปีที่แล้ว +1

      Yes you can do the same setup in windows as well. You will have to make use of respective source or exe for windows. Also change the logs which you need to send in the configuration.

    • @ninoponchev
      @ninoponchev 3 ปีที่แล้ว

      @@Thetips4you Thank you for the fast response! I used the instructions in "grafana.com/docs/loki/latest/installation/docker/" for docker compose. The only thing that I changed was the "volumes"-part for promtail in the docker-compose file (with real dir on my PC). I can open the "/metrics" and "/ready" APIs. But then in log browser in Grafana - the only file that I have is /var/log/dpkg.log. And I also don't see any logs in the graph, when I load the file. Do you think that the setup is working properly? Thanks!

    • @Thetips4you
      @Thetips4you  3 ปีที่แล้ว +1

      You need to check the promtail-config.yaml file. The details of files that is send to Loki is defined in it.

  • @rehan-pn6ed
    @rehan-pn6ed 3 ปีที่แล้ว

    why after i connect data sources, in explore "no logs found". can you help mee??

    • @rehan-pn6ed
      @rehan-pn6ed 3 ปีที่แล้ว

      i cant enter querry command

    • @Thetips4you
      @Thetips4you  3 ปีที่แล้ว

      Check the config files to make sure that the logs location is given correctly.

    • @rehan-pn6ed
      @rehan-pn6ed 3 ปีที่แล้ว

      @@Thetips4you promtail config?

    • @rehan-pn6ed
      @rehan-pn6ed 3 ปีที่แล้ว

      @@Thetips4you thank you, im try install vim and open the log using vim, and in grafana the log are read

  • @twentyfor8351
    @twentyfor8351 3 ปีที่แล้ว

    Hi there, thanks for the video. Been using Grafana for a while and got Promtail/Loki working in Docker tonight. With this current config though, help me wrap my head around WHERE these logs are coming from. Are these logs coming from the Loki or the Promtail container....or is the the Docker host? If I wanted to monitor other logs in other containers on the same Docker network what are we looking at adding?
    Thanks so much!

    • @Thetips4you
      @Thetips4you  3 ปีที่แล้ว

      Nice to know it is helpful for you. The logs are coming as per the configuration in loki config file. In this one we are using the var/logs, you can change the logs location based on your needs.

    • @twentyfor8351
      @twentyfor8351 3 ปีที่แล้ว

      @@Thetips4you So this is /var/log of .....? loki container, promtail container....something else? Thanks for the help.

    • @Thetips4you
      @Thetips4you  3 ปีที่แล้ว +1

      If you check your promtail-config.yaml file, the scrape config will tell you that it is local host or the ip address of the machine. In this case, it should the localhost which is the machine on which docker is running and containers are created.

  • @pablojimenez1025
    @pablojimenez1025 3 ปีที่แล้ว

    Hello, let me introduce myself, my name is Pablo and I wonder if you could help me with how to configure grafana for multi tenat

    • @Thetips4you
      @Thetips4you  3 ปีที่แล้ว

      Sure. I am currently in travelling and busy next week. Will discuss with you after that. Saw your message in Instagram.

  • @anastassiyaryabkova5118
    @anastassiyaryabkova5118 3 ปีที่แล้ว +1

    Thank you

  • @collenkhanyile
    @collenkhanyile 2 ปีที่แล้ว

    This doesnt work.

  • @heatherlayson7101
    @heatherlayson7101 ปีที่แล้ว

    Followed your video and yaml files, but cannot figure out why I am getting this error. I even made the /usr/local/promtailloki permissions recursive 777. On docker-compose up I get this and loki does not come up.
    loki_1 | level=error ts=2023-07-26T22:30:50.598832653Z caller=log.go:106 msg="error running loki" err="mkdir /usr/local/promtailloki: permission denied
    error initialising module: ruler-storage
    github.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule
    \t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:105
    github.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices
    \t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:75
    github.com/grafana/loki/pkg/loki.(*Loki).Run
    \t/src/loki/pkg/loki/loki.go:220
    main.main
    \t/src/loki/cmd/loki/main.go:132
    runtime.main
    \t/usr/local/go/src/runtime/proc.go:204
    runtime.goexit
    \t/usr/local/go/src/runtime/asm_amd64.s:1374"

  • @keycume
    @keycume ปีที่แล้ว +1

    thanks a lot! Master