Metadata-Version: 2.4
Name: metrics-forge
Version: 1.0.0
Summary: Generate Prometheus alerting rules and Grafana dashboards from service definitions
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: pyyaml>=6.0
Dynamic: license-file

# metrics-forge

**Generate Prometheus alerting rules and Grafana dashboards from service definitions.**

Define services with SLOs in YAML, and metrics-forge generates production-ready Prometheus alert rules and Grafana dashboards automatically.

## Features

- **Rule Generation** — Standard + SLO-based Prometheus alert rules per service tier
- **Dashboard Generation** — Grafana dashboards with request rate, latency, CPU, memory, pod panels
- **Service Tiers** — Critical, Standard, Best Effort with adjusted thresholds and durations
- **SLO Support** — Availability, Latency, Error Rate with burn rate alerting
- **Rule Validation** — 10 rules (MET-001 to MET-010) for alert quality
- **Multi-Format Export** — Prometheus YAML, Grafana JSON, report JSON

## Installation

```bash
pip install -e .
```

## Quick Start

```bash
metrics-forge demo
metrics-forge generate demo-metrics/services.yaml
metrics-forge generate demo-metrics/services.yaml -o rules.yaml -d dashboards/
metrics-forge validate demo-metrics/services.yaml
metrics-forge rules
```

## Testing

```bash
python -m pytest tests/ -v
```

## License

MIT
