🚀 Docker Production Optimizations: - Chiseled Ubuntu base image for minimal attack surface - Non-root user execution with security hardening - Read-only filesystem with targeted writable volumes - Resource limits (1GB RAM, 1 CPU) with health checks - Multi-stage builds optimized for caching - Zero-downtime deployment automation 🔍 Comprehensive Monitoring Stack: - Prometheus metrics collection with custom rules - Grafana dashboards for application visualization - AlertManager with email notifications for critical events - Fluentd centralized logging with retention policies - Node Exporter + cAdvisor for system/container metrics - Health check endpoint (/health) for container orchestration 📋 Production Deployment Ready: - Complete deployment scripts with backup strategy - Environment templates for secure configuration - Performance monitoring and alerting rules - Enterprise-grade security and observability 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
external_labels:
|
|
monitor: 'littleshop-monitor'
|
|
|
|
rule_files:
|
|
- "alert_rules.yml"
|
|
|
|
alerting:
|
|
alertmanagers:
|
|
- static_configs:
|
|
- targets:
|
|
- alertmanager:9093
|
|
|
|
scrape_configs:
|
|
# LittleShop application metrics
|
|
- job_name: 'littleshop'
|
|
static_configs:
|
|
- targets: ['littleshop_prod:8080']
|
|
metrics_path: '/metrics'
|
|
scrape_interval: 30s
|
|
scrape_timeout: 10s
|
|
|
|
# Health check monitoring
|
|
- job_name: 'littleshop-health'
|
|
static_configs:
|
|
- targets: ['littleshop_prod:8080']
|
|
metrics_path: '/health'
|
|
scrape_interval: 15s
|
|
scrape_timeout: 5s
|
|
|
|
# Prometheus self-monitoring
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|
|
|
|
# Node Exporter for system metrics
|
|
- job_name: 'node'
|
|
static_configs:
|
|
- targets: ['node_exporter:9100']
|
|
scrape_interval: 30s
|
|
|
|
# cAdvisor for container metrics
|
|
- job_name: 'cadvisor'
|
|
static_configs:
|
|
- targets: ['cadvisor:8080']
|
|
scrape_interval: 30s
|
|
|
|
# Fluentd monitoring
|
|
- job_name: 'fluentd'
|
|
static_configs:
|
|
- targets: ['fluentd:24220']
|
|
scrape_interval: 30s
|
|
|
|
# AlertManager monitoring
|
|
- job_name: 'alertmanager'
|
|
static_configs:
|
|
- targets: ['alertmanager:9093']
|
|
scrape_interval: 30s |