# Kaze Status Page Configuration # Copy this file to config.yaml and customize for your needs # # Docker Usage: # When running in Docker, place this file and the database in a single data directory: # docker run -d -p 8080:8080 -v $(pwd)/data:/app/data ghcr.io/fuwn/kaze:latest # The container expects the config at /app/data/config.yaml # Site metadata site: name: "Kaze Status" description: "Service Status Page" # logo: "https://example.com/logo.svg" # Optional logo URL # favicon: "https://example.com/favicon.ico" # Optional favicon URL # theme_url: "https://raw.githubusercontent.com/anomalyco/opencode/main/packages/opencode/src/cli/cmd/tui/context/theme/opencode.json" # ^ Optional: URL to OpenCode-compatible theme JSON (see https://opencode.ai/theme.json for schema) # custom_head: | # # ^ Optional: Custom HTML to inject into (e.g., analytics, meta tags) # HTTP server settings server: host: "0.0.0.0" port: 8080 # API settings api: # Access control for /api/* endpoints: # "public" - Anyone can access (default) # "private" - API endpoints return 403 Forbidden # "authenticated" - Requires API key via X-API-Key header or ?api_key= query param access: public # API keys (only used when access is "authenticated") # keys: # - "your-secret-api-key-1" # - "your-secret-api-key-2" # Storage settings storage: path: "./kaze.db" # For Docker single-volume: use "./data/kaze.db" to store in mounted volume history_days: 90 # How many days of history to retain (7, 30, or 90) # Display settings display: # Tick aggregation mode for history bar: # ping - Show individual pings (most granular) # minute - Aggregate by minute # hour - Aggregate by hour (default) # day - Aggregate by day (like OpenStatus) tick_mode: hour # Number of ticks/bars to display in the history tick_count: 45 # For 'ping' mode only: # true = Show fixed slots (empty bars for missing data) # false = Grow dynamically as pings come in ping_fixed_slots: true # Timezone for display: # "Browser" - Use visitor's browser timezone (recommended for public status pages) # "Local" - Use server's local timezone # "UTC" - Use UTC timezone # "America/New_York" - Use specific IANA timezone (e.g., "Europe/London", "Asia/Tokyo") timezone: "Browser" # UI scale factor (0.5 to 2.0, default: 1.0) # Adjusts the overall size of text and spacing # scale: 1.0 # Refresh mode: # "page" - Full page refresh (default) # "api" - Fetch updates via API without page reload (smoother UX) # refresh_mode: page # Refresh interval in seconds (default: 30, minimum: 5) # refresh_interval: 30 # Monitor groups groups: - name: "Web Services" # default_collapsed: false # Start collapsed (false = expanded by default) # show_group_uptime: true # Show aggregate uptime percentage (true by default) # Group-level defaults (optional - apply to all monitors in this group unless overridden) # defaults: # # Common options # interval: 30s # timeout: 10s # retries: 2 # verify_ssl: true # hide_ssl_days: false # hide_ping: false # round_response_time: false # round_uptime: false # disable_ping_tooltips: false # disable_uptime_tooltip: false # # HTTP/HTTPS options # method: GET # user_agent: "Custom-Agent/1.0" # expected_status: 200 # expected_content: "ok" # body: '{"ping": true}' # headers: # Authorization: "Bearer token" # # ICMP options # ping_count: 4 # # DNS options # dns_server: "8.8.8.8:53" # record_type: A # # GraphQL options # graphql_query: "query { health }" # graphql_variables: # key: "value" # # Database options # db_type: postgres monitors: - name: "Website" type: https target: "https://example.com" interval: 30s timeout: 10s retries: 2 # Retry 2 times before marking as down (default: 0) # reset_on_next_check: true # Wipe all historical data on next check and flip to false expected_status: 200 # expected_content: "Welcome" # Check if response body contains this text verify_ssl: true # hide_ssl_days: false # Hide SSL certificate days left from display # round_response_time: false # Round response time to nearest second # round_uptime: false # Round uptime percentage (e.g., 99.99% → 100%) # disable_ping_tooltips: false # Disable hover tooltips on ping history bars - name: "API" type: https target: "https://api.example.com/health" link: "https://docs.example.com/api" # Custom link when clicking the monitor name interval: 30s timeout: 10s expected_status: 200 expected_content: '"status":"ok"' # Verify JSON response contains expected data method: GET # user_agent: "Mozilla/5.0 (compatible; StatusMonitor/1.0)" # Custom User-Agent (bypass bot detection) # headers: # Authorization: "Bearer token" - name: "Infrastructure" # default_collapsed: false # show_group_uptime: true monitors: - name: "PostgreSQL" type: database db_type: postgres target: "localhost:5432" # or postgres://user:pass@host:5432/db interval: 30s timeout: 5s - name: "MySQL" type: database db_type: mysql target: "localhost:3306" # or mysql://user:pass@host:3306/db interval: 30s timeout: 5s - name: "Redis" type: database db_type: redis target: "localhost:6379" # or redis://host:6379 interval: 30s timeout: 5s - name: "Memcached" type: database db_type: memcached target: "localhost:11211" interval: 30s timeout: 5s - name: "MongoDB" type: database db_type: mongodb target: "localhost:27017" # or mongodb://user:pass@host:27017 interval: 30s timeout: 5s - name: "Gemini Capsule" type: gemini target: "gemini://example.com" # or example.com:1965 interval: 30s timeout: 10s verify_ssl: false # Often false for self-signed certs in Geminispace # hide_ssl_days: false # Gemini also tracks TLS certificate expiration - name: "Advanced Monitoring" monitors: - name: "Server Ping" type: icmp target: "8.8.8.8" # IP address or hostname interval: 30s timeout: 5s # ping_count: 4 # Number of ICMP packets to send (default: 4) - name: "DNS Resolution" type: dns target: "example.com" # Domain to resolve interval: 60s timeout: 5s # record_type: "A" # DNS record type: A, AAAA, CNAME, MX, TXT (default: A) # dns_server: "8.8.8.8:53" # Custom DNS server (default: system resolver) # expected_ips: # Expected IP addresses (optional) # - "93.184.216.34" # expected_cname: "example.com." # Expected CNAME record (for CNAME queries) - name: "GraphQL API" type: graphql target: "https://api.example.com/graphql" interval: 30s timeout: 10s graphql_query: | query HealthCheck { health { status } } # graphql_variables: # Query variables (optional) # limit: "10" expected_status: 200 # expected_content: '"status":"ok"' # Check response contains text # headers: # Authorization: "Bearer token" # Incidents and maintenance (optional) incidents: # Scheduled maintenance example - title: "Scheduled Maintenance" status: scheduled message: "Database maintenance window - expect brief interruptions" scheduled_start: "2026-02-01T02:00:00Z" scheduled_end: "2026-02-01T04:00:00Z" affected_monitors: - "Database" # Past incident example (resolved) # - title: "API Performance Degradation" # status: resolved # message: "Users experienced slow API response times" # created_at: "2026-01-15T10:00:00Z" # resolved_at: "2026-01-15T12:30:00Z" # updates: # - time: "2026-01-15T10:30:00Z" # status: investigating # message: "Investigating reports of slow API responses" # - time: "2026-01-15T11:00:00Z" # status: identified # message: "Identified database connection pool exhaustion as root cause" # - time: "2026-01-15T12:30:00Z" # status: resolved # message: "Increased connection pool size. Monitoring for stability." # Monitor Configuration Reference # ================================ # # Group-level defaults (optional): # All monitor options (except name, type, target, link, reset_on_next_check, # expected_ips, expected_cname) can be set as group defaults. # Individual monitors can override any default. # defaults: # # Common options # interval: duration - Default check interval # timeout: duration - Default timeout # retries: int - Default retry attempts # verify_ssl: bool - Default SSL verification # hide_ssl_days: bool - Hide SSL certificate days left # hide_ping: bool - Hide response time from display # round_response_time: bool - Round response time to nearest second # round_uptime: bool - Round uptime percentage # disable_ping_tooltips: bool - Disable hover tooltips on ping bars # disable_uptime_tooltip: bool - Disable uptime tooltip with last failure info # # HTTP/HTTPS options # method: string - HTTP method (default: GET) # user_agent: string - Custom User-Agent header # expected_status: int - Expected HTTP status code # expected_content: string - Expected text in response body # body: string - Request body for POST/PUT/PATCH # headers: map[string]string - Custom headers to send # # ICMP options # ping_count: int - Number of ICMP packets to send # # DNS options # dns_server: string - DNS server to query # record_type: string - DNS record type (A, AAAA, CNAME, MX, TXT) # # GraphQL options # graphql_query: string - GraphQL query to execute # graphql_variables: map - GraphQL query variables # # Database options # db_type: string - Database type (postgres, mysql, redis, memcached, mongodb) # # Common fields for all monitor types: # name: string (required) - Display name for the monitor # NOTE: Duplicate names across groups are allowed but will share # the same monitoring data in the database # type: string (required) - Monitor type: http, https, tcp, gemini, icmp, dns, or graphql # target: string (required) - URL, host:port, IP address, or domain to monitor # interval: duration - Check interval (default: 30s, or group default) # timeout: duration - Request timeout (default: 10s, or group default) # retries: int - Number of retry attempts before marking as down (default: 0, or group default) # Retries are attempted with a 500ms delay between attempts # reset_on_next_check: bool - When true, wipes all historical data for this monitor on next check # Automatically flips to false after reset completes # hide_ssl_days: bool - Hide SSL/TLS certificate days left from display (default: false) # hide_ping: bool - Hide response time from display and tooltips (default: false) # round_response_time: bool - Round response time to nearest second (default: false) # round_uptime: bool - Round uptime percentage to whole number (e.g., 99.99% → 100%) (default: false) # disable_ping_tooltips: bool - Disable hover tooltips on ping history bars (default: false, or group default) # disable_uptime_tooltip: bool - Disable uptime tooltip showing last failure info (default: false) # # HTTP/HTTPS specific fields: # expected_status: int - Expected HTTP status code (default: 200) # expected_content: string - Text that must be present in response body # method: string - HTTP method (default: GET) # user_agent: string - Custom User-Agent header (default: "Kaze-Monitor/1.0") # Useful for bypassing bot detection (e.g., Cloudflare) # headers: map[string]string - Custom headers to send # body: string - Request body for POST/PUT/PATCH # verify_ssl: bool - Verify SSL certificate (default: true, or group default) # # Gemini specific fields: # verify_ssl: bool - Verify TLS certificate (default: true, or group default) # Often set to false for self-signed certs in Geminispace # target format: gemini://host or host:port (default port: 1965) # Note: Gemini monitors track TLS certificate expiration like HTTPS # # TCP specific fields: # (none - just needs host:port target) # # ICMP specific fields: # target: string - IP address or hostname to ping # ping_count: int - Number of ICMP packets to send (default: 4) # Note: May require elevated privileges on some systems # # DNS specific fields: # target: string - Domain name to resolve # record_type: string - DNS record type: A, AAAA, CNAME, MX, TXT (default: A) # dns_server: string - Custom DNS server host:port (default: system resolver) # expected_ips: []string - Expected IP addresses to validate (optional) # expected_cname: string - Expected CNAME record to validate (optional) # # GraphQL specific fields: # target: string (required) - GraphQL endpoint URL # graphql_query: string (required) - GraphQL query to execute # graphql_variables: map - Query variables (optional) # expected_status: int - Expected HTTP status code (default: 200) # expected_content: string - Text that must be present in response (optional) # headers: map[string]string - Custom headers (e.g., Authorization) # verify_ssl: bool - Verify SSL certificate (default: true) # # Duration format: # Use Go duration strings: 30s, 1m, 5m, 1h, etc. # # Incident statuses: # scheduled - Planned maintenance # investigating - Looking into the issue # identified - Root cause found # monitoring - Fix applied, monitoring # resolved - Issue resolved # # API access control: # api: # access: string - "public" (default), "private", or "authenticated" # keys: []string - List of valid API keys (for "authenticated" mode) # # Endpoints: # GET /api/health - Simple health check (always public) # Returns: {"status": "ok"} # GET /api/status - All monitors status JSON # GET /api/monitor/{group}/{name} # - Single monitor status JSON # GET /api/history/{group}/{name} # - Monitor history (supports ?mode=ping|minute|hour|day&count=N) # GET /api/page - Full page data (monitors + history + status) in one request # Note: Always public when refresh_mode is "api" # GET /api/summary - Lightweight status overview (counts + overall status, no history) # GET /api/uptime/{group}/{name} # - Historical uptime stats for a monitor # Supports ?period=1h|24h|7d|30d|90d (default: 24h) # GET /api/incidents - List incidents from config # Supports ?filter=all|active|resolved|scheduled (default: all) # GET /api/badge/{group}/{name}.svg # - SVG status badge (always public, shields.io style) # Supports: ?label=custom&style=flat|plastic&type=status|uptime # Example: ![Status](https://status.example.com/api/badge/Services/Website.svg) # POST /api/reload - Reload configuration (always requires API key) # Returns: {"status": "ok", "message": "Configuration reloaded successfully"} # # Note: Monitor endpoints use {group}/{name} path format. URL-encode slashes in names. # Example: /api/monitor/Services/API or /api/monitor/A%2FB%20Tests/Variant%20A # # Authentication (when access is "authenticated"): # - Header: X-API-Key: your-secret-key # - Query param: ?api_key=your-secret-key