Monitoring Stack
Standalone observability bundle with Grafana, Prometheus, and Loki. Ships a working docker-compose setup with auto-provisioned datasources, pre-built service and system dashboards, alert rules for errors, latency, CPU, memory, and disk, plus an alternative Helm chart for Kubernetes deployment. Single command to start, batteries included.
| Name | monitoring-stack |
| Version | 0.1.0 |
| Category | infrastructure |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | monitoring, observability, grafana, prometheus, loki, infrastructure |
| Source | templates/monitoring-stack |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render monitoring-stack --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "monitoring-stack", variables);
# MCP — from an agent
get_template({ name: "monitoring-stack" })Prerequisites
| Tool | Version | Why |
|---|---|---|
docker | — | Container runtime for running the monitoring stack via docker-compose |
docker-compose | >=2.0 | Orchestrate multi-container monitoring stack |
helm (optional) | >=3.0 | Helm CLI for Kubernetes chart deployment (only needed for Helm alternative) |
kubectl (optional) | — | Kubernetes CLI for applying chart output and managing cluster resources |
Variables
Required
ProjectNamestring- Kebab-case project name, used as resource names and labels Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toObservability stack with Grafana, Prometheus, and Loki- Short project description for README and chart metadata
DeployTargetstring — defaults todocker-compose- Primary deployment target (docker-compose or kubernetes)
IncludeAlertsbool — defaults totrue- Include Prometheus alert rules for service and system metrics
What it produces
26 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.env.example
.gitignore
chart/Chart.yaml
chart/templates/_helpers.tpl
chart/templates/grafana/configmap-dashboards.yaml
chart/templates/grafana/configmap-datasources.yaml
chart/templates/grafana/deployment.yaml
chart/templates/grafana/service.yaml
chart/templates/loki/configmap.yaml
chart/templates/loki/service.yaml
chart/templates/loki/statefulset.yaml
chart/templates/namespace.yaml
chart/templates/prometheus/configmap.yaml
chart/templates/prometheus/deployment.yaml
chart/templates/prometheus/service.yaml
chart/values.yaml
docker-compose.yml
grafana/dashboards/service.json
grafana/dashboards/system.json
grafana/provisioning/dashboards/dashboards.yml
grafana/provisioning/datasources/datasources.yml
loki/loki-config.yml
prometheus/prometheus.yml
prometheus/rules/service.yml
prometheus/rules/system.yml
README.mdComposes with
- Pairs with
ts-service - Pairs with
go-service - Pairs with
k8s-deploy - Nests inside
monorepo
Composites that use it
- AI Platform — Full AI platform with HTTP service, LLM gateway, vector store, data pipeline, auth, billing, and monitoring.
- Identity-Aware Spring Boot Microservice — Spring Boot 4 microservice on JDK 25 with identity enforced at both the service-mesh edge (Istio RequestAuthentication + AuthorizationPolicy) and the application boundary (Spring Security OAuth 2.0 resource server) — defense in depth against the same OIDC issuer.
- Spring Boot Microservice — Java Spring Boot 4 HTTP service on JDK 25 with a Kubernetes deployment and an optional Grafana + Prometheus + Loki observability stack.