Skip to main content

AI-friendly Datadog dashboard templating library using Jsonnet - create beautiful dashboards from natural language

Project description

dogonnet 🐶

Tests Lint codecov PyPI version Python 3.10+ License: MIT

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 patterns
  • dogonnet.client - Datadog API client
  • dogonnet.cli - Command-line tools

Documentation

See docs/ for detailed documentation:

For AI Agents & Users:

For Developers:

Examples

Check out examples/ for sample dashboards:

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


Download files

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

Source Distribution

dogonnet-0.1.1.tar.gz (52.9 kB view details)

Uploaded Source

Built Distribution

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

dogonnet-0.1.1-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

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

Hashes for dogonnet-0.1.1.tar.gz
Algorithm Hash digest
SHA256 46902a86f46373789ad54fcc8c0333377ca6b7b6be53c0bac074c2408b96fa13
MD5 a42caf97fe4be5104a87b209858b8ba1
BLAKE2b-256 286321f82ee31448bdf6dec70aa90092ca8ad3e634d9bb9929e48c25b75da07e

See more details on using hashes here.

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

Hashes for dogonnet-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a2469a9d03f4985286df5a6c600414b49baa43a7628692301ba1435dcccdcb5
MD5 598ddc92fc8295d52c6cbd6837f1f053
BLAKE2b-256 a9e86b0aace979d70664026aee1b551ab97527af3f67fc5f8df3eb5b64de4939

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