Improve example config
List default settings and clearly display options.
This commit is contained in:
parent
765235c0ca
commit
a1d620b6d2
1 changed files with 32 additions and 5 deletions
37
config.scfg
37
config.scfg
|
@ -2,21 +2,32 @@
|
||||||
# This directive can be specified multiple times in the main configuration,
|
# This directive can be specified multiple times in the main configuration,
|
||||||
# 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.
|
||||||
|
# Default: unset
|
||||||
include /etc/ntfy-alertmanager/ntfy.scfg
|
include /etc/ntfy-alertmanager/ntfy.scfg
|
||||||
# Public facing base URL of the service (e.g. https://ntfy-alertmanager.example.com)
|
# 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.
|
||||||
|
# Default: ""
|
||||||
base-url https://ntfy-alertmanager.example.com
|
base-url https://ntfy-alertmanager.example.com
|
||||||
# http listen address
|
# http listen address
|
||||||
|
# Default: 127.0.0.1:8080
|
||||||
http-address :8080
|
http-address :8080
|
||||||
# Log level (either debug, info, warning, error)
|
# Log level
|
||||||
|
# Options: debug, info, warning, error
|
||||||
|
# Default: info
|
||||||
log-level info
|
log-level info
|
||||||
# Log format (either text or json)
|
# Log format
|
||||||
|
# Options: text, json
|
||||||
|
# Default: text
|
||||||
log-format text
|
log-format text
|
||||||
# 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 multi)
|
# each on their own (single mode) or be kept together (multi mode)
|
||||||
|
# Options: single, multi
|
||||||
|
# Default: multi
|
||||||
alert-mode single
|
alert-mode single
|
||||||
# Optionally protect with HTTP basic authentication
|
# Optionally protect with HTTP basic authentication
|
||||||
|
# Default: ""
|
||||||
user webhookUser
|
user webhookUser
|
||||||
|
# Default: ""
|
||||||
password webhookPass
|
password webhookPass
|
||||||
|
|
||||||
labels {
|
labels {
|
||||||
|
@ -49,23 +60,31 @@ resolved {
|
||||||
}
|
}
|
||||||
|
|
||||||
ntfy {
|
ntfy {
|
||||||
# URL of the ntfy topic - required
|
# URL of the ntfy topic.
|
||||||
|
# This setting is required.
|
||||||
|
# Default: ""
|
||||||
topic https://ntfy.sh/alertmanager-alerts
|
topic https://ntfy.sh/alertmanager-alerts
|
||||||
# ntfy authentication via Basic Auth (https://docs.ntfy.sh/publish/#username-password)
|
# ntfy authentication via Basic Auth (https://docs.ntfy.sh/publish/#username-password)
|
||||||
|
# Default: ""
|
||||||
user user
|
user user
|
||||||
|
# Default: ""
|
||||||
password pass
|
password pass
|
||||||
# ntfy authentication via access tokens (https://docs.ntfy.sh/publish/#access-tokens)
|
# ntfy authentication via access tokens (https://docs.ntfy.sh/publish/#access-tokens)
|
||||||
# Either access-token or a user/password combination can be used - not both.
|
# Either access-token or a user/password combination can be used - not both.
|
||||||
|
# Default: ""
|
||||||
access-token foobar
|
access-token foobar
|
||||||
# When using (self signed) certificates that cannot be verified, you can instead specify
|
# When using (self signed) certificates that cannot be verified, you can instead specify
|
||||||
# the SHA512 fingerprint.
|
# the SHA512 fingerprint.
|
||||||
# openssl can be used to obtain it:
|
# openssl can be used to obtain it:
|
||||||
# openssl s_client -connect HOST:PORT | openssl x509 -fingerprint -sha512 -noout
|
# openssl s_client -connect HOST:PORT | openssl x509 -fingerprint -sha512 -noout
|
||||||
# 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.
|
||||||
|
# Default: ""
|
||||||
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.
|
||||||
|
# Default: ""
|
||||||
email-address foo@example.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.
|
||||||
|
Default: ""
|
||||||
call +123456789
|
call +123456789
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,9 +97,12 @@ alertmanager {
|
||||||
# When alert-mode is set to "single" all alert labels will be used to create the silence.
|
# When alert-mode is set to "single" all alert labels will be used to create the silence.
|
||||||
# When it is "multi" common labels between all the alerts will be used. WARNING: This
|
# When it is "multi" common labels between all the alerts will be used. WARNING: This
|
||||||
# could silence unwanted alerts.
|
# could silence unwanted alerts.
|
||||||
|
# Default: ""
|
||||||
silence-duration 24h
|
silence-duration 24h
|
||||||
# Basic authentication (https://prometheus.io/docs/alerting/latest/https/)
|
# Basic authentication (https://prometheus.io/docs/alerting/latest/https/)
|
||||||
|
# Default: ""
|
||||||
user user
|
user user
|
||||||
|
# Default: ""
|
||||||
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.
|
||||||
|
@ -90,16 +112,21 @@ 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 disabled).
|
# The type of cache that will be used
|
||||||
|
# Options: disabled, memory, redis
|
||||||
|
# Default: disabled
|
||||||
type memory
|
type memory
|
||||||
# How long messages stay in the cache for
|
# How long messages stay in the cache for
|
||||||
|
# Default: 24h
|
||||||
duration 24h
|
duration 24h
|
||||||
|
|
||||||
# Memory cache settings
|
# Memory cache settings
|
||||||
# Interval in which the cache is cleaned up
|
# Interval in which the cache is cleaned up
|
||||||
|
# Default: 1h
|
||||||
cleanup-interval 1h
|
cleanup-interval 1h
|
||||||
|
|
||||||
# Redis cache settings
|
# Redis cache settings
|
||||||
# URL to connect to redis (default: redis://localhost:6379)
|
# URL to connect to redis (default: redis://localhost:6379)
|
||||||
|
# Default: redis://localhost:6379
|
||||||
redis-url redis://user:password@localhost:6789/3
|
redis-url redis://user:password@localhost:6789/3
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue