diff options
| -rw-r--r-- | config.example.yaml | 2 | ||||
| -rw-r--r-- | internal/config/config.go | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/config.example.yaml b/config.example.yaml index 383c0b4..d751ac5 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -195,6 +195,8 @@ incidents: # # 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) diff --git a/internal/config/config.go b/internal/config/config.go index 71a9b99..f3c35e3 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -288,7 +288,6 @@ func (c *Config) validate() error { return fmt.Errorf("at least one group with monitors is required") } - monitorNames := make(map[string]bool) for _, group := range c.Groups { if group.Name == "" { return fmt.Errorf("group name cannot be empty") @@ -300,10 +299,6 @@ func (c *Config) validate() error { if monitor.Name == "" { return fmt.Errorf("monitor name cannot be empty in group %q", group.Name) } - if monitorNames[monitor.Name] { - return fmt.Errorf("duplicate monitor name: %q", monitor.Name) - } - monitorNames[monitor.Name] = true if monitor.Target == "" { return fmt.Errorf("monitor %q must have a target", monitor.Name) |