AI-friendly Datadog dashboard templating library using Jsonnet - create beautiful dashboards from natural language
Project description
dogonnet 🐶
A Datadog dashboard templating library using Jsonnet - because good dashboards deserve good tools!
Overview
dogonnet is a Python library that provides a Jsonnet-based templating system for creating Datadog dashboards programmatically. Think of it as grafonnet-lib for Datadog.
Features
- Jsonnet Templates: Write dashboards as code using Jsonnet
- 38 Widget Types: 100% coverage of all Datadog dashboard widgets
- Reusable Components: Pre-built widgets and layouts for common patterns
- Type-Safe: Pydantic models for dashboard definitions
- CLI Tools: Push, fetch, export, and manage dashboards
- Rich Presets: Opinionated defaults for beautiful dashboards
- AI-Friendly: Comprehensive guides for LLM agents to create dashboards from natural language
AI Agent Support 🤖
dogonnet is designed to be easily used by AI agents like Claude, ChatGPT, and others. We provide:
- Agent Guide - Comprehensive guide for AI agents with metric-to-widget mapping, decision trees, and templates
- Cookbook - Copy-paste recipes for common dashboard patterns (Golden Signals, RED metrics, business KPIs)
- Progressive Disclosure - Simple one-liners to complex configurations
- Semantic Documentation - Every widget has usage examples and common patterns
Example AI prompts that work:
- "Create a golden signals dashboard for my payment-api service"
- "Make a business dashboard with revenue, signups, and conversion rate"
- "Show me CPU and memory trends for my infrastructure"
Installation
pip install dogonnet
Quick Start
Create a Dashboard with Jsonnet
local dogonnet = import 'dogonnet/lib/main.libsonnet';
dogonnet.dashboard.new(
title='My Service Dashboard',
tags=['service:my-service'],
)
.addRow(
dogonnet.row.new(title='Key Metrics')
.addPanel(
dogonnet.widgets.timeseries(
title='Request Rate',
queries=['avg:http.requests{service:my-service}']
)
)
.addPanel(
dogonnet.widgets.timeseries(
title='Error Rate',
queries=['avg:http.errors{service:my-service}']
)
)
)
Push to Datadog
# Compile and push
dogonnet push my-dashboard.jsonnet
# Export without pushing
dogonnet compile my-dashboard.jsonnet > output.json
# Fetch existing dashboard
dogonnet fetch my-dashboard-id > existing.json
Library Structure
dogonnet.lib.widgets- Widget builders (timeseries, query_value, heatmap, etc.)dogonnet.lib.layouts- Layout utilities (rows, columns, grid)dogonnet.lib.presets- Opinionated presets for common patternsdogonnet.client- Datadog API clientdogonnet.cli- Command-line tools
Documentation
See docs/ for detailed documentation:
For AI Agents & Users:
- Agent Guide - Complete guide for AI agents with templates, patterns, and decision trees
- Cookbook - Copy-paste recipes for common use cases
- Widget Reference - All 38 widgets with examples
- Preset Catalog - Pre-configured common patterns
- Layout Guide - Dashboard organization and positioning
For Developers:
- Design Philosophy - Architecture and principles
- API Version - Datadog API compatibility
Examples
Check out examples/ for sample dashboards:
- examples/basic.jsonnet - Simple dashboard with timeseries widgets
- examples/service-health.jsonnet - Complete service health monitoring
- examples/infrastructure.jsonnet - Infrastructure monitoring (CPU, memory, disk)
- examples/golden-signals.jsonnet - Google SRE Golden Signals (latency, traffic, errors, saturation)
Development
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linter
ruff check .
# Format code
ruff format .
License
MIT
Contributing
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
Acknowledgments
Inspired by grafonnet-lib for Grafana.
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 dogonnet-0.1.1.tar.gz.
File metadata
- Download URL: dogonnet-0.1.1.tar.gz
- Upload date:
- Size: 52.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46902a86f46373789ad54fcc8c0333377ca6b7b6be53c0bac074c2408b96fa13
|
|
| MD5 |
a42caf97fe4be5104a87b209858b8ba1
|
|
| BLAKE2b-256 |
286321f82ee31448bdf6dec70aa90092ca8ad3e634d9bb9929e48c25b75da07e
|
File details
Details for the file dogonnet-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dogonnet-0.1.1-py3-none-any.whl
- Upload date:
- Size: 27.7 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 |
2a2469a9d03f4985286df5a6c600414b49baa43a7628692301ba1435dcccdcb5
|
|
| MD5 |
598ddc92fc8295d52c6cbd6837f1f053
|
|
| BLAKE2b-256 |
a9e86b0aace979d70664026aee1b551ab97527af3f67fc5f8df3eb5b64de4939
|