doubt:EFK Stack: Enterprise-Grade Logging and Monitoring

for instrumenting logs for python app section,
logs are not geeting stored on the hostmachine. NO logs at cd /var/log/containers.but deployment has referenced volume& volume mounts…how the logs are picked/ready by fluentbiyt…even kubectll logs -web-app>>is not showing any logs(not stdout logs)…kindly help

It looks like you deployed your Python application, but no logs are appearing on the host machine or in kubectl logs. You should check your application code to ensure that it is actually generating logs. Make sure there are print statements or logging configured to output to stdout and stderr, as Kubernetes and Fluent Bit typically collect logs from these streams.

Additionally, check if the logging library (e.g., Python’s logging module) is set up correctly and not writing logs to a different location inside the container. If logs are being written to a file inside the container, ensure Fluent Bit is configured to pick them up from the correct path.

@raymond.baoly ,this is not my flask app…i am using the image provided in the course it’self…
as you have said there no log emits…
then how come we are getting logs in the kibana/elastic?
I mean,the logs are not persisted anywhere on the host…
hope my question is clear to you now?

Hi @narendra-jatti,

Please share the lab link, I’ll check and explain detail for you!

thanks for the revert…

efk-stack/python-webapp/k8-deployment at main · kodekloudhub/efk-stack · GitHub,

i am talking about python app deployment…
this app doesn’t push any logs to localhost storage…how the kibana or elastic search is getting data??

https://learn.kodekloud.com/user/courses/efk-stack-enterprise-grade-logging-and-monitoring/module/2c0792c4-1a21-404f-83e2-75698bc62fe0/lesson/998c2644-c864-4844-8ece-55a6fe7e3197

for event simulator deploment,we get the logs generated on the locahost stoarge system…
but same type logs are getting stored for python web app deplyment…but kiban/ES is getting data…

hope my doubt is clear.

Hi,

Based on the lab link you sent, the correct GitHub folder should be:
efk-stack/event-generator at main · kodekloudhub/efk-stack · GitHub.

All log pods always write logs to /var/log/containers/podname. Fluent Bit collects these logs from the host path and sends them to Elasticsearch, where Kibana can access and query them.