aboutsummaryrefslogtreecommitdiff
path: root/config.example.yaml
blob: b9d4ae1e9f36763b55f3945a6b0aa05e2e7d6990 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# 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: |
  #   <script async src="https://analytics.example.com/script.js"></script>
  # ^ Optional: Custom HTML to inject into <head> (e.g., analytics, meta tags)

# HTTP server settings
server:
  host: "0.0.0.0"
  port: 8080

# 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

# 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:
    #   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
    #   method: GET
    #   user_agent: "Custom-Agent/1.0"
    #   expected_status: 200
    #   headers:
    #     Authorization: "Bearer token"
    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):
#   defaults:
#     interval: duration         - Default check interval for all monitors in group
#     timeout: duration          - Default timeout for all monitors in group
#     retries: int               - Default retry attempts for all monitors in group
#     verify_ssl: bool           - Default SSL verification for all monitors in group
#     hide_ssl_days: bool        - Hide SSL certificate days left (default: false)
#     hide_ping: bool            - Hide response time from display (default: false)
#     round_response_time: bool  - Round response time to nearest second (default: false)
#     round_uptime: bool         - Round uptime percentage (default: false)
#     disable_ping_tooltips: bool - Disable hover tooltips on ping bars (default: false)
#     disable_uptime_tooltip: bool - Disable uptime tooltip with last failure info (default: false)
#     method: string             - HTTP method for HTTP/HTTPS monitors (default: GET)
#     user_agent: string         - Custom User-Agent header
#     expected_status: int       - Expected HTTP status code (default: 200)
#     headers: map[string]string - Custom headers to send
#   Note: Individual monitors can override these defaults
#
# 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