NthLayer - The Missing Layer of Reliability
Project description
Early Access - NthLayer is in active development. We're looking for early adopters to try it and share feedback! Join the discussion or report issues.
NthLayer
The Missing Layer of Reliability
One YAML file. Complete reliability stack. Zero toil.
Auto-generate dashboards, SLOs, alerts, runbooks, and deployment gates from a single service definition.
Explore the docs ยป
View Demo
ยท
Report Bug
ยท
Request Feature
Table of Contents
๐ Live Demo
See what NthLayer generates โ real dashboards, real metrics, real configs:
What's in the demo:
- Live Grafana Dashboards - 6 auto-generated dashboards with real metrics from our demo app
- Generated Configs - Real dashboard JSON, SLO definitions, alert rules, and recording rules
- Demo Site - Overview of NthLayer capabilities with links to live examples
About The Project
NthLayer eliminates operational toil by auto-generating SLOs, alerts, dashboards, and deployment gates from simple service definitions.
Define once. Generate everywhere. Zero toil.
The Problem
Every new service requires 20+ hours of manual operational setup:
- 6 hours: Define SLOs and calculate error budgets
- 4 hours: Research and configure alert rules for dependencies (PostgreSQL, Redis, Kafka, etc.)
- 5 hours: Build Grafana dashboards with technology-specific panels
- 5 hours: Set up deployment gates, runbooks, and PagerDuty escalation
Cost: 20 hours ร 200 services = 4,000 hours of annual toil
The Solution
Write one YAML file. NthLayer generates everything automatically with a unified workflow:
# 1. Initialize from template
$ nthlayer init payment-api --team payments --template critical-api
# 2. Preview what will be generated (like terraform plan)
$ nthlayer plan payment-api.yaml
โ
SLOs (3)
โ
Alerts (28) - PostgreSQL, Redis, Kubernetes
โ
Dashboard (1) - 12 panels
โ
Recording Rules (21) - 10x faster dashboards
โ
PagerDuty Service (1)
# 3. Generate everything at once (like terraform apply)
$ nthlayer apply payment-api.yaml
โ
[1/5] SLOs โ 3 created
โ
[2/5] Alerts โ 28 created
โ
[3/5] Dashboard โ 1 created
โ
[4/5] Recording โ 21 created
โ
[5/5] PagerDuty โ 1 created
Successfully applied 54 resources in 1.2s
# 4. Check deployment readiness
$ nthlayer check-deploy payment-api.yaml
โ
Deployment approved (15% error budget consumed)
# Or use environment-specific configs
$ nthlayer apply payment-api.yaml --env prod
Time saved: 20 hours โ 5 minutes โก
Commands: 7 โ 2 (like Terraform!) ๐
Built With
Key Features
Unified Workflow (NEW!)
- โ
nthlayer plan- Preview all resources (liketerraform plan) - โ
nthlayer apply- Generate everything at once (liketerraform apply) - โ Auto-Detection - Automatically detects what resources to generate
- โ One Command - Replace 5-7 commands with a single unified workflow
- โ Declarative - Define once, get everything (SLOs, alerts, dashboards, rules)
Core Capabilities
- โ 5 Built-in Templates - critical-api, standard-api, low-api, background-job, pipeline
- โ SLO Generation - Generates Sloth specifications from service definitions
- โ Auto-Generated Alerts - 400+ battle-tested rules from awesome-prometheus-alerts
- โ
Multi-Environment Support - Dev/staging/prod configs with
--envflag - โ PagerDuty Integration - Auto-creates services with escalation policies
- โ Prometheus Integration - Real-time error budget tracking
- โ Deployment Gates - Error budget-based deployment validation
- โ
Template Variables - Portable queries with
${service},${team}, etc.
Observability Suite
- โ Hybrid Dashboard Model - Intent-based templates + live metric discovery for zero "No Data" panels
- โ Dashboard Generation - Auto-generate Grafana dashboards (12-28 panels per service)
- โ Technology Templates - 40+ production-grade panels for PostgreSQL, Redis, Elasticsearch, MongoDB, HTTP/API
- โ 118 Auto-Generated Alerts - Production-ready Prometheus alerts with smart routing
- โ Recording Rules - 20+ pre-computed metrics for 10x faster dashboards
- โ 4 Deployment Methods - Kubernetes, Mimir/Cortex, GitOps, or traditional Prometheus
Getting Started
Get NthLayer running locally in 5 minutes. No external accounts required for development.
Prerequisites
You only need:
- Docker - For PostgreSQL and Redis
- Python 3.9+ - For the NthLayer CLI
- Make - For convenient shortcuts (optional)
Installation
Option 1: pip install (recommended)
pip install nthlayer
Option 2: From source (for development)
-
Clone the repo
git clone https://github.com/rsionnach/nthlayer.git cd nthlayer
-
Run setup (installs dependencies, starts services, runs migrations)
make setup -
Verify installation
make test # All 84 tests should pass โ
-
Try the demo
make demo-reconcile # Shows step-by-step what NthLayer does
That's it! You're ready to use NthLayer.
Usage
Unified Workflow (Recommended)
Preview what will be generated:
nthlayer plan payment-api.yaml
# Output:
# โ
SLOs (3)
# โ
Alerts (28)
# โ
Dashboard (1)
# โ
Recording Rules (21)
# โ
PagerDuty Service (1)
Generate all resources at once:
nthlayer apply payment-api.yaml
# Output:
# โ
[1/5] SLOs โ 3 created
# โ
[2/5] Alerts โ 28 created
# โ
[3/5] Dashboard โ 1 created
# โ
[4/5] Recording โ 21 created
# โ
[5/5] PagerDuty โ 1 created
With environment-specific configs:
# Production: Stricter thresholds, all alerts
nthlayer apply payment-api.yaml --env prod
# Development: Relaxed thresholds, critical alerts only
nthlayer apply payment-api.yaml --env dev
Advanced options:
# Skip specific resources
nthlayer apply payment-api.yaml --skip pagerduty
# Only generate specific resources
nthlayer apply payment-api.yaml --only slos dashboard
# Verbose output
nthlayer apply payment-api.yaml --verbose
# Dry-run (preview without writing files)
nthlayer apply payment-api.yaml --dry-run
Individual Commands (Advanced)
For granular control, individual commands are still available:
# Generate specific resource types
nthlayer generate-slo payment-api.yaml
nthlayer generate-alerts payment-api.yaml
nthlayer generate-dashboard payment-api.yaml --full
nthlayer generate-recording-rules payment-api.yaml
# Check deployment readiness
nthlayer check-deploy payment-api.yaml
Development Workflow
# Start services
make dev-up
# Run tests
make test
# Start mock API server
make mock-server
# Demo workflows
make demo-reconcile
# Stop services
make dev-down
For more examples and detailed usage, please refer to the Getting Started Guide and Documentation
Documentation
User Guides
- GETTING_STARTED.md - 10-minute quick start guide
- docs/OBSERVABILITY.md - Dashboard & recording rules guide
- docs/ENVIRONMENTS.md - Multi-environment configuration
- docs/ALERTS.md - Auto-generated alerts documentation
- docs/TEMPLATES.md - Service template reference
- docs/CUSTOM_TEMPLATES.md - Custom template guide
Developer Docs
- docs/DEVELOPMENT.md - Complete developer guide
- docs/DIAGRAMS.md - Visual architecture diagrams
- Makefile - Run
make helpto see all commands - nthlayer_architecture.md - System architecture
Reference
- CHANGELOG.md - Feature changelog
- ATTRIBUTION.md - Third-party attributions
- LICENSING_COMPLIANCE.md - License compliance
- archive/dev-notes/ - Development history
Roadmap
Recently Completed โ
- Multi-environment support (dev/staging/prod)
- Auto-generated alerts (400+ rules)
- Dashboard generation (12-28 panels)
- Technology templates (PostgreSQL, Redis, K8s, HTTP/API)
- Recording rules (20+ metrics)
- Template variables and portability
Coming Soon
- MySQL, MongoDB, Elasticsearch templates
- Custom panel selection for dashboards
- Multi-service aggregate dashboards
- Datadog integration
- Slack notifications
See the open issues for a full list of proposed features and known issues.
Contributing
Contributions are what make the open source community amazing. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
- Read GETTING_STARTED.md to understand the codebase
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Write tests with
respxmocks - Run tests and linting (
make test lint format) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt for more information.
Acknowledgments
NthLayer builds on the shoulders of giants:
Core Dependencies
- grafana-foundation-sdk - Grafana dashboard generation SDK (Apache 2.0). Powers our Hybrid Model for intent-based dashboard generation with type-safe panel building.
- awesome-prometheus-alerts - 580+ battle-tested alert rules (CC BY 4.0). Our alert templates for PostgreSQL, Redis, Elasticsearch, and 40+ technologies.
Architecture Inspiration
Tooling
- Best-README-Template - This README structure
- Shields.io - Badges used in this README
- Slidev - Presentation framework for our decks
Quick Links
Getting Started:
# Setup and test
make setup && make test
# Try the unified workflow
nthlayer plan examples/services/payment-api.yaml
nthlayer apply examples/services/payment-api.yaml
Need Help?
- ๐ Quick Start Guide
- ๐ฌ Open an Issue
- ๐ฏ View Roadmap
Happy coding! ๐
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 nthlayer-0.1.0a1.tar.gz.
File metadata
- Download URL: nthlayer-0.1.0a1.tar.gz
- Upload date:
- Size: 213.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
400eaaa9bac8c7ca45903d2f80ebbf74697cb7c4b72f7f484f99063a58af0fb7
|
|
| MD5 |
1bcc72d809f3fc00bf4b2275446e1909
|
|
| BLAKE2b-256 |
bbb9d03456861e22fb4000511ff74fd473180ca53e9893191acaea2283200a9d
|
File details
Details for the file nthlayer-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: nthlayer-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 231.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42cc621e27872a10bae0564901c10683bfc6a9b270c525e1ab7496190c0f84a9
|
|
| MD5 |
308a30056ee48391fafa9c3a91d92ad7
|
|
| BLAKE2b-256 |
3410d6f6f65e01f7cfb9e189b7964e252cf498ccdf4ce44121ec850a6cd3ba78
|