Skip to main content

dLogs - one command installer/bootstrapper for your logging & monitoring stack

Project description

dLogs: The "1-Click" Observability Stack

PyPI version Docker Image

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: Install via pip or Docker.
  • 🖥️ 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 ntfy server for push notifications.
  • 🐍 Python SDK: dlogs wrapper to start logging in 2 lines of code.

💿 Installation

Option 1: Python (Recommended)

Install using pip (or pipx for isolation):

pip install motidivya-dlogs

Then initialize and start the stack:

# Create a folder for your stack
mkdir my-stack
cd my-stack

# Initialize configuration
dlogs init .

# Start the stack
dlogs up .

Option 2: Docker

Run the CLI container directly:

docker run --rm -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v $(pwd):/app/work \
  divyesh1099/dlogs up /app/work

Option 3: Installer Script (Windows)

iwr -useb https://raw.githubusercontent.com/divyesh1099/dLogs/main/install_dlogs.ps1 | iex

🐍 Python Integration (dLogs SDK)

The dlogs package includes a zero-dependency wrapper to send logs directly to this stack.

Usage:

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 (or configured directory).
  • 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 (admin/admin) 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_exporter service running on port 9182.

2. 🐳 Docker Containers

  • CPU/Memory per Container: identify resource hogs.
  • Network Traffic: See which container is chatting the most.
  • Requirement: cadvisor container running.

3. 🟢 Nvidia GPU

  • Usage %: Graphics load.
  • VRAM: Memory allocation.
  • Temp/Power: Thermal monitoring.
  • Requirement: dlogs-gpu container + 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.

🛠️ 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 log folder 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).

Moti❤️

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

motidivya_dlogs-0.1.5.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

motidivya_dlogs-0.1.5-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file motidivya_dlogs-0.1.5.tar.gz.

File metadata

  • Download URL: motidivya_dlogs-0.1.5.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for motidivya_dlogs-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3c89bd2dc7dece9a625e9169c454e2f0fa54e5d05a48fcc4a97136fcddec6541
MD5 f8cb57de51a5dd641e2c3db284968479
BLAKE2b-256 479ed1c3d7cfe22d6766e91a5df43f1cadb909655990d0cb0d3672759632fc80

See more details on using hashes here.

File details

Details for the file motidivya_dlogs-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for motidivya_dlogs-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b7200431d6be2a5699d8eda59793e825ab47b901e3663c16b5df595bd452ea6a
MD5 c82027d75a1cff5a76747bcc22cc587b
BLAKE2b-256 221724c62de4bd1a005fac8ba62975dfd7db28bf0650d9a12a2949d8a7ca47af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page