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.
This commit is contained in:
parent
3f545efc95
commit
a9fa7e4b23
2 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ http-address :8080
|
||||||
# Log level (either debug, info, warning, error)
|
# Log level (either debug, info, warning, error)
|
||||||
log-level info
|
log-level info
|
||||||
# When multiple alerts are grouped together by Alertmanager, they can either be sent
|
# 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
|
alert-mode single
|
||||||
# Optionally protect with HTTP basic authentication
|
# Optionally protect with HTTP basic authentication
|
||||||
user webhookUser
|
user webhookUser
|
||||||
|
@ -104,7 +104,7 @@ alertmanager {
|
||||||
# When the alert-mode is set to single, ntfy-alertmanager will cache each single alert
|
# When the alert-mode is set to single, ntfy-alertmanager will cache each single alert
|
||||||
# to avoid sending recurrences.
|
# to avoid sending recurrences.
|
||||||
cache {
|
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
|
type memory
|
||||||
# How long messages stay in the cache for
|
# How long messages stay in the cache for
|
||||||
duration 24h
|
duration 24h
|
||||||
|
|
|
@ -90,9 +90,9 @@ func ReadConfig(path string) (*Config, error) {
|
||||||
// Set default values
|
// Set default values
|
||||||
config.HTTPAddress = "127.0.0.1:8080"
|
config.HTTPAddress = "127.0.0.1:8080"
|
||||||
config.LogLevel = "info"
|
config.LogLevel = "info"
|
||||||
config.AlertMode = Single
|
config.AlertMode = Multi
|
||||||
|
|
||||||
config.Cache.Type = "memory"
|
config.Cache.Type = "disabled"
|
||||||
config.Cache.Duration = time.Hour * 24
|
config.Cache.Duration = time.Hour * 24
|
||||||
// memory
|
// memory
|
||||||
config.Cache.CleanupInterval = time.Hour
|
config.Cache.CleanupInterval = time.Hour
|
||||||
|
|
Loading…
Reference in a new issue