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.
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.
@@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!
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!
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.
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.
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"
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.
Yes should be possible.
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.
Check file path is correct.
Could the same configuration be done in Windows? And how do you send logs to loki? Thanks a lot!
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.
@@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!
You need to check the promtail-config.yaml file. The details of files that is send to Loki is defined in it.
why after i connect data sources, in explore "no logs found". can you help mee??
i cant enter querry command
Check the config files to make sure that the logs location is given correctly.
@@Thetips4you promtail config?
@@Thetips4you thank you, im try install vim and open the log using vim, and in grafana the log are read
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!
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.
@@Thetips4you So this is /var/log of .....? loki container, promtail container....something else? Thanks for the help.
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.
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
Sure. I am currently in travelling and busy next week. Will discuss with you after that. Saw your message in Instagram.
Thank you
You are welcome.
This doesnt work.
What is the issue?
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"
thanks a lot! Master
You are welcome.