aboutsummaryrefslogtreecommitdiff
path: root/internal/monitor/monitor.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-19 19:41:22 -0800
committerFuwn <[email protected]>2026-01-19 19:41:22 -0800
commit5cb6f53da0f5927edad01e854432eb0b70371b89 (patch)
tree133824d444dc38134996eadb30a34ed63b44cfd1 /internal/monitor/monitor.go
parentfeat: Add disable_ping_tooltips option to hide ping hover details (diff)
downloadkaze-5cb6f53da0f5927edad01e854432eb0b70371b89.tar.xz
kaze-5cb6f53da0f5927edad01e854432eb0b70371b89.zip
feat: Add ICMP, DNS, and GraphQL monitor types
Add three new monitor types with full support: - ICMP: Ping monitoring with configurable packet count, tracks packet loss and average RTT. Marks degraded on partial packet loss. - DNS: DNS resolution monitoring supporting A, AAAA, CNAME, MX, and TXT records. Optional custom DNS server and validation of expected IPs/CNAME. - GraphQL: GraphQL endpoint monitoring with query execution, variable support, error detection, and content validation. All new monitors include retry support, response time tracking, and integrate with existing display options (round_response_time, etc). GraphQL monitors also support SSL certificate tracking.
Diffstat (limited to 'internal/monitor/monitor.go')
-rw-r--r--internal/monitor/monitor.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/monitor/monitor.go b/internal/monitor/monitor.go
index f4a6f66..5ec283a 100644
--- a/internal/monitor/monitor.go
+++ b/internal/monitor/monitor.go
@@ -34,7 +34,7 @@ type Monitor interface {
// Name returns the monitor's name
Name() string
- // Type returns the monitor type (http, https, tcp, gemini)
+ // Type returns the monitor type (http, https, tcp, gemini, icmp, dns, graphql)
Type() string
// Target returns the monitor target (URL or host:port)
@@ -68,6 +68,12 @@ func New(cfg config.MonitorConfig) (Monitor, error) {
return NewTCPMonitor(cfg)
case "gemini":
return NewGeminiMonitor(cfg)
+ case "icmp":
+ return NewICMPMonitor(cfg)
+ case "dns":
+ return NewDNSMonitor(cfg)
+ case "graphql":
+ return NewGraphQLMonitor(cfg)
default:
return nil, &UnsupportedTypeError{Type: cfg.Type}
}