🤖 AI-Powered Debugging for K8 & Loki by Dingus
Welcome to Chat with Logs, your intelligent debugging assistant designed for seamless K8 & Loki integration! This tool analyses your production logs, detects critical issues, and suggests actionable fixes—helping you resolve problems faster and more efficiently.
Whether you're a lead engineer troubleshooting production issues or a hobbyist debugging side projects, Chat with Logs empowers you with AI-driven insights to accelerate incident resolution.
Before getting started, configure your environment variables and folders. Copy the sample configuration:
mkdir logs data reports .kube
cp sample.env .env
These environment variables are essential for connecting Chat with Logs to K8 & Loki, as well as enabling AI-powered log analysis. The remaining variables can be left as default (Note: if you are using linux, swap http://host.docker.internal
with your host machine's local IP).
If you do not wish to start with your Loki production logs, use this simulation repository for creating simulated logs locally
Variable Name | Example Value | Description |
---|---|---|
OPENAI_API_KEY | sk-xxxxxxxxxx |
API key for OpenAI, required for AI-driven log analysis. |
LOKI_URL | http://localhost:3100 |
URL of your Loki instance, where logs are stored and queried. |
LOKI_JOB_NAME | my-app-logs |
The Loki job name that Chat with Logs will analyze for issues. |
KUBE_CONFIG_PATH | file_path/config.yaml |
The Kubernetes config file path. |
If running on mac, use colima for reduced overheads rather that Docker Desktop
colima start
This project runs on Docker. If you haven't installed it yet, grab it here. This was built using Docker 20.10.17, but newer versions should work fine.
Time to get this ship sailing! 🚢
Run the following command to build and start everything:
docker compose up --build
This will pull dependencies, build the image, and fire up the container.
Need to peek inside the container? No problem!
docker compose exec <SERVICE NAME> bash
i.e.
docker compose exec dingus bash
Now you have full access to the running environment.
Keep your code clean and formatted:
format-checks
code-checks
To start debugging via the command line:
docker compose exec dingus bash
python dingus/run.py
This will let you chat with your logs and uncover hidden bugs! 🕵️♂️
Want a slick web UI instead? We've got you covered! 🚀
Run the following command inside the container:
docker compose up --build
Once it's running, head over to:
http://localhost:8501
or for FastAPI UI
http://localhost:8000
Enjoy the visual debugging experience!
🔧 Happy Debugging! 🚀
For more help and information with the codebase see www.dingusai.dev.