From a9fa7e4b230e75b2d1e1ffa020a65296fc2f4313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Wed, 12 Jul 2023 19:17:47 +0200 Subject: [PATCH] config: Switch default values of alert mode and cache type By default alerts will no longer be split apart and any caching functionality will be disabled. With this the behaviour will be closer to what the user has configured in Alertmanger/Prometheus itself. --- README.md | 4 ++-- config/config.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2b3d89..96cede3 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ http-address :8080 # Log level (either debug, info, warning, error) log-level info # When multiple alerts are grouped together by Alertmanager, they can either be sent -# each on their own (single mode) or be kept together (multi mode) (either single or multi; default is single) +# each on their own (single mode) or be kept together (multi mode) (either single or multi; default is multi) alert-mode single # Optionally protect with HTTP basic authentication user webhookUser @@ -104,7 +104,7 @@ alertmanager { # When the alert-mode is set to single, ntfy-alertmanager will cache each single alert # to avoid sending recurrences. cache { - # The type of cache that will be used (either disabled, memory or redis; default is memory). + # The type of cache that will be used (either disabled, memory or redis; default is disabled). type memory # How long messages stay in the cache for duration 24h diff --git a/config/config.go b/config/config.go index f4ae1af..a9312f0 100644 --- a/config/config.go +++ b/config/config.go @@ -90,9 +90,9 @@ func ReadConfig(path string) (*Config, error) { // Set default values config.HTTPAddress = "127.0.0.1:8080" config.LogLevel = "info" - config.AlertMode = Single + config.AlertMode = Multi - config.Cache.Type = "memory" + config.Cache.Type = "disabled" config.Cache.Duration = time.Hour * 24 // memory config.Cache.CleanupInterval = time.Hour