forked from moira-alert/doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notifier.example.yml
163 lines (163 loc) · 7.53 KB
/
notifier.example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Redis configuration depends on fields specified in redis config section:
# 1. Use field `master_name` to enable Redis Sentinel support
# 2. Specify two or more `addrs` to enable cluster support
# 3. Otherwise, standalone configuration is enabled
redis:
# Sentinel master name
master_name: ""
# address list, format: {host1_name:port},{ip:port}
addrs: "localhost:6379"
# Redis username
username: "username"
# Redis password
password: "password"
# Moira will delete metrics older than this value from Redis. Large values will lead to various problems everywhere.
# See https://github.com/moira-alert/moira/pull/519
metrics_ttl: 3h
# Dial timeout for establishing new connections
# Default is 500 milliseconds
dial_timeout: 1s
# Timeout for socket reads. If reached, commands will fail
# with a timeout instead of blocking. Default is 3 seconds.
# Skip this setting or set 0 for default.
read_timeout: 5s
# Timeout for socket writes. If reached, commands will fail
# with a timeout instead of blocking. Default is ReadTimeout.
# Skip this setting or set 0 for default.
write_timeout: 5s
telemetry:
# Common port for all telemetry data: Prometheus scraping, pprof, etc.
listen: ":8091"
pprof:
# If true, pprof will be enabled on common telemetry port.
enabled: false
graphite:
# If true, graphite sender will be enabled.
enabled: true
# If true, runtime stats will be captured and sent to graphite. Note: It takes to call stoptheworld() with configured "graphite.interval" to capture runtime stats (https://golang.org/src/runtime/mstats.go)
runtime_stats: false
# Graphite relay URI, format: ip:port
uri: "graphite-relay:2003"
# Moira metrics prefix. Use 'prefix: {hostname}' to use hostname autoresolver.
prefix: DevOps.moira
# Metrics sending interval
interval: 60s
notifier:
# Soft timeout to start retrying to send notification after single failed attempt
sender_timeout: 10s
# Hard timeout to stop retrying to send notification after multiple failed attempts
resending_timeout: "1:00"
# Web-UI uri prefix for trigger links in notifications. For example: with 'http://localhost' every notification will contain link like 'http://localhost/trigger/triggerId'
front_uri: "https://moira.example.com"
# Timezone to use to convert ticks. Default is UTC. See https://golang.org/pkg/time/#LoadLocation for more details.
timezone: Europe/Moscow
# Format for email sender. Default is "15:04 02.01.2006". See https://golang.org/pkg/time/#Time.Format for more details about golang time formatting.
date_time_format: "15:04 02.01.2006"
# Amount of messages notifier reads from Redis per iteration, -1 for unlimited
read_batch_size: -1
# List of senders, every element has "type" field (one of ["pushover", "slack", "mail", "telegram", "twilio sms", "twilio voice", "script"])
# Every type of sender has additional config fields
senders:
- type: msteams
#the max amount of events you want to be sent to your channel, -1 for unlimited, any other positive value to limit events
max_events: -1
- type: pushover
# Api token for your pushover channel, for more info see https://pushover.net/api#registration
api_token: ...
- type: slack
# Api token for your moira notifications slack user, for more info see https://get.slack.help/hc/en-us/articles/215770388-Create-and-regenerate-API-tokens
api_token: ...
# If true, notification will be sent with state-specific icon, for more info see https://moira.readthedocs.io/en/latest/installation/configuration.html#slack-icons.
use_emoji: false
- type: telegram
# Api token for your telegram bot, for more info about creating bot and get token see https://core.telegram.org/bots#3-how-do-i-create-a-bot
api_token: ...
- type: mail
mail_from: ...
smtp_host: ...
smtp_port: ...
# Skip SMTP server certificate chain validation if false
insecure_tls: false
# Uses "mail_from" if empty
smtp_user: ...
smtp_pass: ...
# Email template file path (standard Go templates). By default use 'Fancy' template (see screenshot below). If empty, use build-in template with no markups and styles.
template_file: '/etc/moira/fancy-template.html'
- type: twilio voice
api_asid: ...
api_authtoken: ...
api_fromphone: ...
# URL that responds with TwiML config for voice message generation, see https://www.twilio.com/docs/api/twiml/voice-overview
voiceurl: ...
append_message: true
- type: twilio sms
api_asid: ...
api_authtoken: ...
api_fromphone: ...
# Script and webhook senders support additional templated parameters:
# ${contact_id} contact ID
# ${contact_value} contact value (as specified by user via web UI)
# ${contact_type} contact type (as specified in web UI config file)
# ${trigger_id} trigger ID
- type: script
name: ...
# Executable path. File must exist on all machines where notifier is running.
# You can use templated parameters here (see above), they will be replaced with appropriate values.
exec: ...
- type: webhook
name: ...
# URL to send POST request (you can use templated parameters, see above)
url: ...
timeout: ...
# Basic authorization parameters (if required)
user: ...
password: ...
- type: pagerduty
- type: opsgenie
api_key: ...
- type: victorops
routing_url: ...
- type: discord
token: ...
# Self state monitor configuration section. Note: No inner subscriptions is required. Moira will use its notification mechanism to send messages.
moira_selfstate:
enabled: true
# If true, Moira selfstate will check remote triggers checker works properly and notify admin if remote checker fails
# See https://moira.readthedocs.io/en/latest/installation/configuration.html#remote-triggers-checker for futher information
remote_triggers_enabled: false
# Max Redis disconnect delay to send alert when reached
redis_disconect_delay: 60s
# Max Filter metrics receive delay to send alert when reached
last_metric_received_delay: 120s
# Max Checker checks perform delay to send alert when reached
last_check_delay: 120s
# Max Remote triggers Checker checks perform delay to send alert when reached
# See https://moira.readthedocs.io/en/latest/installation/configuration.html#remote-triggers-checker for futher information
last_remote_check_delay: 300s
# Self state monitor alerting interval
notice_interval: 300s
# Contact list for Self state monitor alerts, use this like delivery channels in web-ui
contacts:
- type: mail
value: [email protected]
log:
log_file: stdout
log_level: info
# This section configures remote triggers Checker.
# See https://moira.readthedocs.io/en/latest/installation/configuration.html#remote-triggers-checker for futher information
remote:
enabled: false
# URL of Graphite HTTP API: graphite-web, carbonapi, etc.
# Specify full URL including '/render'
url: "http://graphite.example.com/render"
# Auth username. Only Basic-auth supported
user: devops
# Auth password. Only Basic-auth supported
password: verySecurePassword
# Min period to perform triggers re-check.
# Note: Reducing of this value leads to increasing of CPU and memory usage values and extra load on Graphite HTTP API
check_interval: 60s
# Don't fetch metrics older than this value from remote storage
metrics_ttl: 168h
# Maximum timeout for HTTP-request made to Graphite HTTP API
timeout: 60s