forked from moira-alert/doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.example.yml
140 lines (137 loc) · 5.63 KB
/
api.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
# 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
api:
# Api local network address. Default is ':8081' so api will be available at http://moira.company.com:8081/api
listen: ":8081"
# If true, CORS for cross-domain requests will be enabled. This option can be used only for debugging purposes.
enable_cors: false
# Web_UI config file path. If file not found, api will return 404 in response to "api/config"
web_config_path: "/etc/moira/web.json"
web:
# Moira administrator email address
supportEmail: "devops@example.com"
# List of enabled contact types
contacts:
- type: mail
label: E-mail
validation: "^.+@.+\\..+$"
- type: msteams
label: Microsoft Teams
- type: pushover
label: Pushover
placeholder: "Pushover user key"
- type: slack
label: Slack
validation: "^[@#][a-zA-Z0-9-_]+"
placeholder: "Slack #channel or @user"
- type: telegram
label: Telegram
placeholder: "#public_channel, %private_channel, @username or group"
help: |
### To make things work you should:
### In personal chat:
- start conversation with bot [@YourMoiraBot](https://t.me/YourMoiraBot);
- execute command `/start`;
- type your login in above field as `@login`.
### In group chat:
- invite bot [@YourMoiraBot](https://t.me/YourMoiraBot) into chat;
- execute command `/start@YourMoiraBot`;
- bot will send you chat name, you should type it without extra characters in above field.
### In public channel:
- add bot [@YourMoiraBot](https://t.me/YourMoiraBot) into channel;
- promote bot as channel administrator;
- type channel name in above field as `#channel`.
### In private channel:
- add bot [@YourMoiraBot](https://t.me/YourMoiraBot) into the channel;
- promote bot as channel administrator;
- open your private channel on the [web](https://web.telegram.org/#/im);
- get channel id from URL (e.g., `https://web.telegram.org/#/im?p=c1494975744_17340166617136722341`) between `c` and `_`;
- type channel id in the above field as `%1494975744`.
- type: twilio sms
label: Twilio SMS
validation: "^\\+79\\d{9}$"
placeholder: "Phone number format +79*********"
- type: twilio voice
label: Twilio voice
validation: "^\\+79\\d{9}$"
placeholder: "Phone number format +79*********"
- type: webhook
label: My Webhook
validation: "^(http|https):\\/\\/.*(example.com|example.org)(:[0-9]{2,5})?\\/"
placeholder: "https://example.com/webhooks/moira"
help: "### Domains whitelist:\n - example.com\n - example.org"
- type: pagerduty
label: PagerDuty
placeholder: "Integration key"
- type: opsgenie
label: OpsGenie
placeholder: "Responder Name or ID"
- type: victorops
label: VictorOps
placeholder: "Routing key"
- type: discord
label: Discord
placeholder: "Discord channel (eg: general-text) or user (eg: @user)"
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