dLogs - one command installer/bootstrapper for your logging & monitoring stack
Project description
dLogs: The "1-Click" Observability Stack
Monitor Everything. Windows Host, Docker Containers, Nvidia GPUs, and App Logs. All in one place.
dLogs is a pre-configured, high-performance observability stack built on top of the industry-standard LGTM stack (Loki, Grafana, Telegraf/Promtail, Monitoring/Prometheus), enhanced with automatic dashboard provisioning and Python integration.
🚀 Features
- ⚡ Instant Setup: One script installs everything. No manual config editing required.
- 🖥️ Full Windows Visibility: CPU, RAM, Disk I/O, Network traffic, and Services.
- 🐳 Docker Stats: CPU/Memory/Network per container (powered by cAdvisor).
- 🎮 Nvidia GPU Monitoring: realtime usage, temperatures, and power draw (WSL2 supported).
- 📜 Centralized Logging: Logs from your Python apps + Docker logs in one queryable UI.
- 🔔 Alerts: Built-in
ntfyserver for push notifications. - 🐍 Python SDK:
dlogs.pywrapper to start logging in 2 lines of code.
🛠️ Architecture
The stack runs completely locally using Docker Compose:
| Component | Port | Purpose |
|---|---|---|
| Grafana | 3000 |
The Dashboard UI. Access via http://localhost:3000. |
| Prometheus | 9090 |
Time-series database for metrics. |
| Loki | 3100 |
Log aggregation system (like Splunk/ELK but lighter). |
| Promtail | — |
Log collector. Watches C:\Logs and sends to Loki. |
| cAdvisor | 8090 |
Container usage metrics (Google's official tool). |
| GPU/Nvidia | 9835 |
nvidia_gpu_exporter for monitoring graphics cards. |
| Windows | 9182 |
windows_exporter MSI running natively on host. |
| Ntfy | 8080 |
Notification server (publish/subscribe). |
💿 Installation
✅ Windows (Recommended)
We provide a PowerShell automation script that handles everything: directories, file downloads, and Docker startup.
Prerequisites:
- Docker Desktop (Running).
- PowerShell (Admin).
Steps:
- Open PowerShell as Administrator.
- Navigate to the
dLogsfolder. - Run the installer:
.\install_dlogs.ps1
This script will:- Create
C:\dLogsandC:\Logs. - Download & Configure
windows_exporter. - Patch configuration files with correct ports.
- Boot the Docker stack.
- Create
Fixing Missing Metrics: If you see "No Data" for Windows or Docker, run the helper fixes:
- Windows Exporter: Run
.\fix_windows_metrics.ps1(Installs MSI + Firewall Rule). - Docker Metrics: Run
.\install_dlogs.ps1again (Updates configs for cAdvisor).
🐧 Linux / 🍏 macOS
The core stack is standard Docker Compose. The install_dlogs.ps1 script is Windows-specific, but you can run the stack manually:
- Ensure Docker is running.
- Edit
docker-compose.yml:- Change volume
C:/Logs:/var/log/host_logsto a valid Linux path (e.g.,./logs:/var/log/host_logs). - Remove
windows_exporterreferences or replace withnode_exporter.
- Change volume
- Run:
python setup.py # (Optional) Guidelines through configuration docker-compose up -d --build
🐍 Python Integration (dLogs SDK)
We provide dlogs.py, a zero-dependency wrapper to send logs directly to this stack.
Usage:
- Copy
dlogs.pyto your project. - Import and use:
from dlogs import dLogs
# Initialize (Automatically creates C:/Logs/my_app.json)
logger = dLogs("my_super_app")
# Log normal info (Shows in Loki/Grafana)
logger.log("Application started successfully.")
# Log errors (Highlights in Red)
try:
1 / 0
except Exception as e:
logger.alert(f"Critical math failure: {e}")
How it works:
- It writes structured JSON logs to
C:\Logs\app_name.json. - Promtail (running in Docker) watches that folder.
- It scrapes the new lines instantly and sends them to Loki.
- You view them in Grafana Explore (
{job="varlogs"} |= "my_super_app").
📊 Dashboards Guide
Grafana comes pre-provisioned. Go to http://localhost:3000/dashboards and open the dLogs folder.
1. 🪟 Windows Host
- Real-time CPU/RAM: Total system usage.
- Network I/O: Upload/Download speeds.
- Disk Usage: Space on C: drive.
- Requirement:
windows_exporterservice running on port 9182.
2. 🐳 Docker Containers
- CPU/Memory per Container: identify resource hogs.
- Network Traffic: See which container is chatting the most.
- Requirement:
cadvisorcontainer running.
3. 🟢 Nvidia GPU
- Usage %: Graphics load.
- VRAM: Memory allocation.
- Temp/Power: Thermal monitoring.
- Requirement:
dlogs-gpucontainer + Nvidia Drivers.
4. 🪵 Loki Logs
- Search Engine: Query logs using LogQL.
- Filters: Filter by app name, log level (INFO/ERROR).
- Live Tail: See logs as they happen.
❓ Troubleshooting
Q: "Datasource not found" error?
Run
.\install_dlogs.ps1again. It regenerates the correct UIDs (dlogs-prometheus,dlogs-loki) and provisions them.
Q: "Windows Dashboard has N/A data"?
Run
.\fix_windows_metrics.ps1as Administrator. Ensure Port 9182 is allowed in Firewall.
Q: "Docker Dashboard is empty"?
Ensure
dlogs-cadvisoris running (docker ps). If missing, pull the latest code and re-run installer.
Q: "GPU Dashboard empty"?
Only works on machines with Nvidia GPUs. Ensure connection to
dlogs-gpu:9835is working.
Moti❤️
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file motidivya_dlogs-0.1.4.tar.gz.
File metadata
- Download URL: motidivya_dlogs-0.1.4.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1e292dce8fb9d569fc082a17625995cae9a03fd0cfd956a476ee16e9a9ab4d7
|
|
| MD5 |
71ff8f3d414565c02d7d4acf8a2b5b06
|
|
| BLAKE2b-256 |
e96814386501e183ccb7de88b6cfe5cf959aed7aa44be3f84ef001a996da7128
|
File details
Details for the file motidivya_dlogs-0.1.4-py3-none-any.whl.
File metadata
- Download URL: motidivya_dlogs-0.1.4-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b70667d680f109328582b39dd4016cb9afe3bcd1779b3817764e847e8d4ae6ec
|
|
| MD5 |
fb3d5e9372de227264037e3bccdccf1c
|
|
| BLAKE2b-256 |
4a271b6fb6010f14cd540abd3fce80d9ca9e408bfe5f5fc0cd0b5c0eb1d4f165
|