aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-20 06:39:49 -0800
committerFuwn <[email protected]>2026-01-20 06:39:49 -0800
commit7eae8963da2312e663b253bc06d365061f13fe5c (patch)
treeccb37aae8e9d1cf1b49ec47712e62d30fde3bd0d /internal/config
parentfix: Use correct column name error_message in last failure query (diff)
downloadkaze-7eae8963da2312e663b253bc06d365061f13fe5c.tar.xz
kaze-7eae8963da2312e663b253bc06d365061f13fe5c.zip
feat: Add disable_uptime_tooltip option
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go41
1 files changed, 21 insertions, 20 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 626873b..b598306 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -77,26 +77,27 @@ type MonitorDefaults struct {
// MonitorConfig represents a single monitor
type MonitorConfig struct {
- Name string `yaml:"name"`
- Type string `yaml:"type"` // http, https, tcp, gemini
- Target string `yaml:"target"`
- Link string `yaml:"link,omitempty"` // Custom URL for clicking the monitor name (e.g., docs page)
- Interval Duration `yaml:"interval"`
- Timeout Duration `yaml:"timeout"`
- Retries int `yaml:"retries,omitempty"` // Number of retry attempts before marking as down
- ResetOnNextCheck bool `yaml:"reset_on_next_check,omitempty"` // Wipe monitor data on next check and flip to false
- ExpectedStatus int `yaml:"expected_status,omitempty"`
- ExpectedContent string `yaml:"expected_content,omitempty"` // Expected text in response body
- VerifySSL *bool `yaml:"verify_ssl,omitempty"`
- HideSSLDays bool `yaml:"hide_ssl_days,omitempty"` // Hide SSL days left from display
- HidePing bool `yaml:"hide_ping,omitempty"` // Hide response time from display
- RoundResponseTime bool `yaml:"round_response_time,omitempty"` // Round response time to nearest second
- RoundUptime bool `yaml:"round_uptime,omitempty"` // Round uptime percentage (e.g., 99.99% → 100%)
- DisablePingTooltips bool `yaml:"disable_ping_tooltips,omitempty"` // Disable hover tooltips on ping history bars
- Method string `yaml:"method,omitempty"`
- UserAgent string `yaml:"user_agent,omitempty"` // Custom User-Agent header (default: "Kaze-Monitor/1.0")
- Headers map[string]string `yaml:"headers,omitempty"`
- Body string `yaml:"body,omitempty"`
+ Name string `yaml:"name"`
+ Type string `yaml:"type"` // http, https, tcp, gemini
+ Target string `yaml:"target"`
+ Link string `yaml:"link,omitempty"` // Custom URL for clicking the monitor name (e.g., docs page)
+ Interval Duration `yaml:"interval"`
+ Timeout Duration `yaml:"timeout"`
+ Retries int `yaml:"retries,omitempty"` // Number of retry attempts before marking as down
+ ResetOnNextCheck bool `yaml:"reset_on_next_check,omitempty"` // Wipe monitor data on next check and flip to false
+ ExpectedStatus int `yaml:"expected_status,omitempty"`
+ ExpectedContent string `yaml:"expected_content,omitempty"` // Expected text in response body
+ VerifySSL *bool `yaml:"verify_ssl,omitempty"`
+ HideSSLDays bool `yaml:"hide_ssl_days,omitempty"` // Hide SSL days left from display
+ HidePing bool `yaml:"hide_ping,omitempty"` // Hide response time from display
+ RoundResponseTime bool `yaml:"round_response_time,omitempty"` // Round response time to nearest second
+ RoundUptime bool `yaml:"round_uptime,omitempty"` // Round uptime percentage (e.g., 99.99% → 100%)
+ DisablePingTooltips bool `yaml:"disable_ping_tooltips,omitempty"` // Disable hover tooltips on ping history bars
+ DisableUptimeTooltip bool `yaml:"disable_uptime_tooltip,omitempty"` // Disable hover tooltip on uptime percentage
+ Method string `yaml:"method,omitempty"`
+ UserAgent string `yaml:"user_agent,omitempty"` // Custom User-Agent header (default: "Kaze-Monitor/1.0")
+ Headers map[string]string `yaml:"headers,omitempty"`
+ Body string `yaml:"body,omitempty"`
// ICMP specific fields
PingCount int `yaml:"ping_count,omitempty"` // Number of ICMP packets to send (default: 4)
// DNS specific fields