# Iris Monitoring

This package deploys the Prometheus Operator and Grafana resources for the Iris
runtime in Kubernetes.

## Contents

- `prometheus/servicemonitors.yaml`: scrape discovery for `iris-api`,
  `iris-conversation`, `iris-memory`, `iris-agent`, `iris-voice`, and
  `iris-worker`.
- `prometheus/recording-rules.yaml`: request, latency, service-domain, SLI, SLO,
  error-budget, and resource recording rules.
- `alerting/alerts.yaml`: SLO, availability, service-domain, provider, database,
  and resource alerts.
- `grafana/dashboards/`: operational dashboards loaded by the Grafana sidecar or
  file provider.

## Deploy

```bash
kubectl apply -k infra/monitoring/iris
```

The manifests assume the `observability` namespace and Prometheus Operator CRDs
already exist. The Iris base tracing stack also declares the namespace when it
is deployed from `infra/k8s/iris/base/tracing`.

## Validation

```bash
npx --yes kustomize build infra/monitoring/iris
```

After deployment, verify scrape targets and rule health:

```bash
kubectl get servicemonitor,prometheusrule -n observability -l team=iris
kubectl get configmap -n observability iris-grafana-dashboards
```
