PrizmKit Monitoring Setup
Generate comprehensive monitoring, alerting, and log collection configurations for your project's observability stack.
Commands
prizmkit.monitoring
Generate monitoring and observability configurations.
STEPS:
- Read
.prizm-docs/root.prizmfor tech stack and architecture (services, databases, external dependencies) - Ask user: monitoring stack
- Prometheus + Grafana
- ELK (Elasticsearch, Logstash, Kibana)
- CloudWatch (AWS)
- Datadog
- Other (specify)
- Identify key metrics to monitor:
- Application (RED metrics):
- Request Rate: requests per second by endpoint
- Error rate: 4xx/5xx responses, exception counts
- Duration: latency percentiles (p50, p95, p99)
- System:
- CPU utilization and saturation
- Memory usage and swap
- Disk I/O and space
- Network throughput and errors
- Business:
- Feature-specific metrics derived from spec (signups, transactions, etc.)
- SLA/SLO compliance indicators
- Database:
- Connection pool utilization
- Query latency by type (read/write)
- Replication lag
- Slow query count
- Application (RED metrics):
- Generate monitoring configs:
- Metrics collection: Scrape configs, exporters, or agent configurations
- Alert rules with severity levels:
- Critical: immediate page (service down, data loss risk)
- Warning: investigate soon (degraded performance, approaching limits)
- Info: awareness (deployment events, scaling events)
- Dashboard definition: JSON/YAML for Grafana or equivalent
- Overview dashboard: service health at a glance
- Detail dashboard: per-service deep dive
- Log format and collection config:
- Structured log format recommendation
- Log shipping configuration
- Log retention policy
- Generate health check endpoint code if not existing:
- Liveness probe: process is running
- Readiness probe: dependencies are available
- Startup probe: initialization complete
- Write configs to standard locations:
- Prometheus:
monitoring/prometheus.yml,monitoring/alerts.yml - Grafana:
monitoring/dashboards/ - Application: health check endpoint in source code
- Prometheus:
Path References
All internal asset paths MUST use ${SKILL_DIR} placeholder for cross-IDE compatibility.
Output
- Monitoring configuration files in
monitoring/directory - Alert rule definitions
- Dashboard JSON/YAML files
- Health check endpoint code (if generated)
微信扫一扫