config: Use "example.com" domain
This is recommended by RFC2606[1]. [1]: https://datatracker.ietf.org/doc/html/rfc2606
This commit is contained in:
parent
dc9741b798
commit
af3857d162
2 changed files with 17 additions and 17 deletions
14
config.scfg
14
config.scfg
|
@ -3,9 +3,9 @@
|
||||||
# but only the last occurrence of a setting will be used. Settings from
|
# but only the last occurrence of a setting will be used. Settings from
|
||||||
# the main configuration will take precedence.
|
# the main configuration will take precedence.
|
||||||
include /etc/ntfy-alertmanager/ntfy.scfg
|
include /etc/ntfy-alertmanager/ntfy.scfg
|
||||||
# Public facing base URL of the service (e.g. https://ntfy-alertmanager.xenrox.net)
|
# Public facing base URL of the service (e.g. https://ntfy-alertmanager.example.com)
|
||||||
# This setting is required for the "Silence" feature.
|
# This setting is required for the "Silence" feature.
|
||||||
base-url https://ntfy-alertmanager.xenrox.net
|
base-url https://ntfy-alertmanager.example.com
|
||||||
# http listen address
|
# http listen address
|
||||||
http-address :8080
|
http-address :8080
|
||||||
# Log level (either debug, info, warning, error)
|
# Log level (either debug, info, warning, error)
|
||||||
|
@ -25,9 +25,9 @@ labels {
|
||||||
severity "critical" {
|
severity "critical" {
|
||||||
priority 5
|
priority 5
|
||||||
tags "rotating_light"
|
tags "rotating_light"
|
||||||
icon "https://foo.com/critical.png"
|
icon "https://example.com/critical.png"
|
||||||
# Forward messages which severity "critical" to the specified email address.
|
# Forward messages which severity "critical" to the specified email address.
|
||||||
email-address foo@bar.com
|
email-address foo@example.com
|
||||||
# Call the specified number. Use `yes` to pick the first of your verified numbers.
|
# Call the specified number. Use `yes` to pick the first of your verified numbers.
|
||||||
call yes
|
call yes
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ labels {
|
||||||
# Settings for resolved alerts
|
# Settings for resolved alerts
|
||||||
resolved {
|
resolved {
|
||||||
tags "resolved,partying_face"
|
tags "resolved,partying_face"
|
||||||
icon "https://foo.com/resolved.png"
|
icon "https://example.com/resolved.png"
|
||||||
priority 1
|
priority 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ ntfy {
|
||||||
# For convenience ntfy-alertmanager will convert the certificate to lower case and remove all colons.
|
# For convenience ntfy-alertmanager will convert the certificate to lower case and remove all colons.
|
||||||
certificate-fingerprint 13:6D:2B:88:9C:57:36:D0:81:B4:B2:9C:79:09:27:62:92:CF:B8:6A:6B:D3:AD:46:35:CB:70:17:EB:99:6E:28:08:2A:B8:C6:79:4B:F6:2E:81:79:41:98:1D:53:C8:07:B3:5C:24:5F:B1:8E:B6:FB:66:B5:DD:B4:D0:5C:29:91
|
certificate-fingerprint 13:6D:2B:88:9C:57:36:D0:81:B4:B2:9C:79:09:27:62:92:CF:B8:6A:6B:D3:AD:46:35:CB:70:17:EB:99:6E:28:08:2A:B8:C6:79:4B:F6:2E:81:79:41:98:1D:53:C8:07:B3:5C:24:5F:B1:8E:B6:FB:66:B5:DD:B4:D0:5C:29:91
|
||||||
# Forward all messages to the specified email address.
|
# Forward all messages to the specified email address.
|
||||||
email-address foo@bar.com
|
email-address foo@example.com
|
||||||
# Call the specified number for all alerts. Use `yes` to pick the first of your verified numbers.
|
# Call the specified number for all alerts. Use `yes` to pick the first of your verified numbers.
|
||||||
call +123456789
|
call +123456789
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ alertmanager {
|
||||||
password pass
|
password pass
|
||||||
# By default the Alertmanager URL gets parsed from the webhook. In case that
|
# By default the Alertmanager URL gets parsed from the webhook. In case that
|
||||||
# Alertmanger is not reachable under that URL, it can be overwritten here.
|
# Alertmanger is not reachable under that URL, it can be overwritten here.
|
||||||
url https://alertmanager.xenrox.net
|
url https://alertmanager.example.com
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
func TestReadConfig(t *testing.T) {
|
func TestReadConfig(t *testing.T) {
|
||||||
configContent := `
|
configContent := `
|
||||||
base-url https://ntfy-alertmanager.xenrox.net
|
base-url https://ntfy-alertmanager.example.com
|
||||||
http-address :8080
|
http-address :8080
|
||||||
log-level info
|
log-level info
|
||||||
log-format json
|
log-format json
|
||||||
|
@ -24,8 +24,8 @@ labels {
|
||||||
severity "critical" {
|
severity "critical" {
|
||||||
priority 5
|
priority 5
|
||||||
tags "rotating_light"
|
tags "rotating_light"
|
||||||
icon "https://foo.com/critical.png"
|
icon "https://example.com/critical.png"
|
||||||
email-address foo@bar.com
|
email-address foo@example.com
|
||||||
call yes
|
call yes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ labels {
|
||||||
|
|
||||||
resolved {
|
resolved {
|
||||||
tags "resolved,partying_face"
|
tags "resolved,partying_face"
|
||||||
icon "https://foo.com/resolved.png"
|
icon "https://example.com/resolved.png"
|
||||||
priority 1
|
priority 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ alertmanager {
|
||||||
silence-duration 24h
|
silence-duration 24h
|
||||||
user user
|
user user
|
||||||
password pass
|
password pass
|
||||||
url https://alertmanager.xenrox.net
|
url https://alertmanager.example.com
|
||||||
}
|
}
|
||||||
|
|
||||||
cache {
|
cache {
|
||||||
|
@ -66,7 +66,7 @@ cache {
|
||||||
`
|
`
|
||||||
|
|
||||||
expectedCfg := &Config{
|
expectedCfg := &Config{
|
||||||
BaseURL: "https://ntfy-alertmanager.xenrox.net",
|
BaseURL: "https://ntfy-alertmanager.example.com",
|
||||||
HTTPAddress: ":8080",
|
HTTPAddress: ":8080",
|
||||||
LogLevel: "info",
|
LogLevel: "info",
|
||||||
LogFormat: "json",
|
LogFormat: "json",
|
||||||
|
@ -84,8 +84,8 @@ cache {
|
||||||
"severity:critical": {
|
"severity:critical": {
|
||||||
Priority: "5",
|
Priority: "5",
|
||||||
Tags: []string{"rotating_light"},
|
Tags: []string{"rotating_light"},
|
||||||
Icon: "https://foo.com/critical.png",
|
Icon: "https://example.com/critical.png",
|
||||||
EmailAddress: "foo@bar.com",
|
EmailAddress: "foo@example.com",
|
||||||
Call: "yes",
|
Call: "yes",
|
||||||
},
|
},
|
||||||
"severity:info": {Priority: "1"},
|
"severity:info": {Priority: "1"},
|
||||||
|
@ -102,11 +102,11 @@ cache {
|
||||||
SilenceDuration: time.Hour * 24,
|
SilenceDuration: time.Hour * 24,
|
||||||
User: "user",
|
User: "user",
|
||||||
Password: "pass",
|
Password: "pass",
|
||||||
URL: "https://alertmanager.xenrox.net",
|
URL: "https://alertmanager.example.com",
|
||||||
},
|
},
|
||||||
Resolved: resolvedConfig{
|
Resolved: resolvedConfig{
|
||||||
Tags: []string{"resolved", "partying_face"},
|
Tags: []string{"resolved", "partying_face"},
|
||||||
Icon: "https://foo.com/resolved.png",
|
Icon: "https://example.com/resolved.png",
|
||||||
Priority: "1",
|
Priority: "1",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue