tests: Remove comments from test config
This commit is contained in:
parent
b58ce4acb3
commit
37714a4a64
1 changed files with 0 additions and 19 deletions
|
@ -10,17 +10,10 @@ import (
|
||||||
|
|
||||||
func TestReadConfig(t *testing.T) {
|
func TestReadConfig(t *testing.T) {
|
||||||
configContent := `
|
configContent := `
|
||||||
# Public facing base URL of the service (e.g. https://ntfy-alertmanager.xenrox.net)
|
|
||||||
# This setting is required for the "Silence" feature.
|
|
||||||
base-url https://ntfy-alertmanager.xenrox.net
|
base-url https://ntfy-alertmanager.xenrox.net
|
||||||
# http listen address
|
|
||||||
http-address :8080
|
http-address :8080
|
||||||
# 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
|
|
||||||
# each on their own (single mode) or be kept together (multi mode) (either single or multi; default is single)
|
|
||||||
alert-mode multi
|
alert-mode multi
|
||||||
# Optionally protect with HTTP basic authentication
|
|
||||||
user webhookUser
|
user webhookUser
|
||||||
password webhookPass
|
password webhookPass
|
||||||
|
|
||||||
|
@ -48,32 +41,20 @@ resolved {
|
||||||
}
|
}
|
||||||
|
|
||||||
ntfy {
|
ntfy {
|
||||||
# URL of the ntfy topic - required
|
|
||||||
topic https://ntfy.sh/alertmanager-alerts
|
topic https://ntfy.sh/alertmanager-alerts
|
||||||
# ntfy access control (https://ntfy.sh/docs/config/#access-control)
|
|
||||||
user user
|
user user
|
||||||
password pass
|
password pass
|
||||||
}
|
}
|
||||||
|
|
||||||
alertmanager {
|
alertmanager {
|
||||||
# If set, the ntfy message will contain a "Silence" button, which can be used
|
|
||||||
# to create a silence via the Alertmanager API. Because of limitations in ntfy,
|
|
||||||
# the request will be proxied through ntfy-alertmanager. Therefore ntfy-alertmanager
|
|
||||||
# needs to be exposed to external network requests and base-url has to be set.
|
|
||||||
silence-duration 24h
|
silence-duration 24h
|
||||||
# Basic authentication (https://prometheus.io/docs/alerting/latest/https/)
|
|
||||||
user user
|
user user
|
||||||
password pass
|
password pass
|
||||||
url https://alertmanager.xenrox.net
|
url https://alertmanager.xenrox.net
|
||||||
}
|
}
|
||||||
|
|
||||||
# When the alert-mode is set to single, ntfy-alertmanager will cache each single alert
|
|
||||||
# to avoid sending recurrences.
|
|
||||||
cache {
|
cache {
|
||||||
# How long messages stay in the cache for
|
|
||||||
duration 48h
|
duration 48h
|
||||||
# Interval in which the cache is cleaned up
|
|
||||||
# cleanup-interval 1h
|
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue