-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example
More file actions
255 lines (209 loc) · 13.5 KB
/
Copy pathconfig.example
File metadata and controls
255 lines (209 loc) · 13.5 KB
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# ═══════════════════════════════════════════════════════════════════════════
# AlertView — complete configuration reference
#
# Every field is optional except `sources`. Active lines below show a working
# setup; commented lines show an option with its default value, so you can
# uncomment and edit any of them.
#
# Full documentation: docs/configuration/
# This file is watched: changes apply without restarting. Changing `port`,
# `tls_insecure` or `log_format` does need a restart — they are read once at
# startup.
# ═══════════════════════════════════════════════════════════════════════════
# ───────────────────────────────────────────────────────────────────────────
# Server
# ───────────────────────────────────────────────────────────────────────────
port: 8080 # HTTP port (env: ALERTVIEW_PORT)
refresh_interval: 30 # seconds between two auto-refreshes in the browser
# Ignore TLS certificate errors on every source (self-signed certificates).
# Insecure: prefer adding your CA to the trust store.
tls_insecure: false
# Cache the alerts fetched from each source for this many seconds. 0 disables
# it, which is fine for a handful of dashboards. Raise it if many browsers hit
# the same instance and you want to spare the sources. (env: ALERTVIEW_CACHE_TTL)
cache_ttl_seconds: 0
# "text" for human-readable logs, "json" for structured ones
# (env: ALERTVIEW_LOG_FORMAT). Log level comes from RUST_LOG, e.g. RUST_LOG=debug
log_format: "text"
# ─── Auto-reload ───
# "polling" works everywhere, including a ConfigMap mounted in Kubernetes where
# inotify does not see the symlink swap. "inotify" reacts instantly.
# (env: ALERTVIEW_CONFIG_WATCH_METHOD, ALERTVIEW_CONFIG_POLL_INTERVAL)
config_watch_method: "polling"
config_poll_interval: 10 # seconds, only used with "polling"
# ───────────────────────────────────────────────────────────────────────────
# Sources — where the alerts come from
#
# `url` is the plain service URL: the API path is appended for you
# (/api/v2 for Alertmanager, /api/alertmanager/grafana/api/v2 for Grafana,
# /api_jsonrpc.php for Zabbix). A URL already pointing at the API is accepted.
# Names must be unique: they key the cache and the source filter.
# ───────────────────────────────────────────────────────────────────────────
sources:
# ─── Alertmanager ───
# Every per-source option is documented on this first entry.
- name: "Alertmanager"
type: alertmanager
url: "http://alertmanager.example.com:9093"
# Fallback link for the ↗ button when the alert carries no generator URL
dashboard_url: "https://grafana.example.com/alerting/list"
# Seconds before an attempt is abandoned (default: 15)
timeout: 15
# Label carrying the severity, matched case-insensitively (default:
# "severity"). Set it if your alerts use a different label name.
# severity_label: "level"
# Template for the ↗ "open in the source" button. Falls back to the alert's
# own generator URL, then to dashboard_url above.
# link_template: "https://grafana.example.com/alerts?query={{.Labels.alertname}}"
# Per-source overrides of the display settings further down
# alert_link_template: "https://wiki.example.com/runbook/{{.Labels.alertname}}"
# source_link: false # no ↗ button for this source
# ─ Authentication (pick one) ─
# basic_auth:
# username: admin
# password: secret
# bearer_token: "YOUR_TOKEN_HERE"
# ─ Retries ─
# Delay between attempts is initial_delay_ms × 2^(attempt-1), capped at
# max_delay_ms. HTTP 4xx is not retried — a 404 or a 401 is a configuration
# problem, not a hiccup — except 408 and 429; 5xx and network errors are.
# retry_policy:
# max_retries: 3
# initial_delay_ms: 1000
# max_delay_ms: 30000
# ─── Grafana (its built-in Alertmanager) ───
- name: "Grafana"
type: grafana
url: "http://grafana.example.com:3000"
dashboard_url: "https://grafana.example.com/"
timeout: 15
# A service account token is the recommended credential
# bearer_token: "YOUR_GRAFANA_TOKEN_HERE"
# basic_auth:
# username: admin
# password: secret
# link_template: "https://grafana.example.com/d/{{.Annotations.dashboardUid}}?viewPanel={{.Annotations.panelId}}"
# ─── Zabbix ───
# Problems are mapped as: severity 5 → critical, 4 → high, 3 and 2 → warning,
# 1 → info. An acknowledged or suppressed problem is shown as silenced, with
# the acknowledgement message as its comment. Problems whose trigger is
# disabled are dropped, as Zabbix's own Problems view does. `eventid` and
# `triggerid` are added as labels, for use in templates.
- name: "Zabbix"
type: zabbix
url: "https://zabbix.example.com/zabbix"
dashboard_url: "https://zabbix.example.com/zabbix/zabbix.php?action=problem.view"
timeout: 15
# bearer_token: "YOUR_ZABBIX_API_TOKEN"
# link_template: "https://zabbix.example.com/zabbix/zabbix.php?action=problem.view&triggerids[]={{.Labels.triggerid}}"
# ───────────────────────────────────────────────────────────────────────────
# Display
# ───────────────────────────────────────────────────────────────────────────
display:
# ─── What each alert shows ───────────────────────────────────────────────
# Labels rendered as "key=value" chips. Only the ones an alert carries show up.
labels:
- namespace
- job
- instance
- cluster
- node
- pod
- host
- hostgroup
# Labels shown in front of the alert name, in both normal and TV mode, joined
# by prefix_separator. Only the ones the alert carries are shown, they are
# dropped from the chips above so nothing appears twice, and they show up even
# when they are not listed in `labels`.
# prefix_labels: ["hostname"]
# prefix_separator: " / "
# false shows the `summary` annotation in place of the alert name. An alert
# without a summary keeps its name, and the name itself is not lost: it moves
# behind the "+N" button as an alertname= chip.
# show_alert_name: true
# false puts every chip behind that same "+N" button — one click brings them
# back. `labels` above stays declared.
# show_labels: true
# Replaces the coloured dot on critical alerts, so they stand out at a
# glance. Three icons ship with AlertView and always render: "flame",
# "bell-off" and "hourglass" — the Noto Color Emoji drawings, embedded.
# Any other value is shown as text: a typed emoji works, but only where the
# machine displaying the dashboard has a colour emoji font, and a kiosk or a
# minimal Linux box usually has none. "" gives criticals their red dot back
# like every other severity.
# critical_icon: "flame"
# Status markers. Alerts carry no status badge: "firing" is the norm and
# saying so on every row is noise, so only the exceptions get an icon. A
# status missing from the map, or mapped to "", shows nothing.
# status_icons:
# silenced: "bell-off"
# pending: "hourglass"
# ─── Severity ────────────────────────────────────────────────────────────
# Severity levels, most severe first. Drives the alert sorting, the filter
# chips, the group ordering and the sound picked for a batch of new alerts.
# A severity absent from this list sorts after every listed one, so add your
# own levels here. Matching is case-insensitive and understands the aliases
# crit / err / warn / information.
# severity_order: ["critical", "error", "high", "warning", "info", "none"]
# ─── Links ───────────────────────────────────────────────────────────────
# Turns the coloured dot (or the critical icon) into a link built from the
# alert's labels — it lights up on hover to say so. Independent from the ↗
# button, which keeps its own destination.
# Placeholders: {{.Labels.x}}, {{.Annotations.x}}, {{.Name}}, {{.Severity}},
# {{.Status}}, {{.Source}}, {{.SourceType}}, {{.Fingerprint}}, {{.StartsAt}},
# {{.EndsAt}}. Values are percent-encoded; an alert missing a label the
# template asks for is simply not clickable; only http(s) links are rendered.
# Can be overridden per source.
# alert_link_template: "https://wiki.example.com/runbook/{{.Labels.alertname}}?host={{.Labels.hostname}}"
# Show the ↗ "open in the source" button (overridable per source)
# source_link: true
# false opens links in the same tab, which is what you want on a kiosk
# link_new_tab: true
# ─── Grouping ────────────────────────────────────────────────────────────
# Group alerts under collapsible headers. Groups are ordered by their most
# severe alert; an alert missing one of these labels lands in a "<missing>"
# group rather than disappearing.
# Grouping by team is the usual way to share one screen between teams — for a
# screen *per* team, use a label filter in the URL instead: ?q=team=sre
# group_by: ["team"]
# ─── Appearance ──────────────────────────────────────────────────────────
# "auto" follows the browser/OS light-dark setting and switches live; "dark"
# and "light" force one. Someone clicking the theme button in the UI overrides
# this in their own browser.
# theme: "auto"
# Extra stylesheet layered on top of the theme
# custom_css: "https://example.com/alertview-theme.css"
# "local", "UTC", or any IANA timezone (e.g. "Europe/Paris")
# timezone: "local"
# Beep when new alerts arrive, with a different tone per severity. Browsers
# only allow it once the user has interacted with the page.
# play_sounds: false
# Start in TV mode (dense rows, auto-hiding HUD). Only applies to a browser
# where nobody has used the TV button yet; "?tv=1" in the URL always wins and
# is the reliable option for a wall display.
# tv_mode_default: false
# ───────────────────────────────────────────────────────────────────────────
# Environment variables
#
# ALERTVIEW_CONFIG path to this file (also: alertview --config)
# ALERTVIEW_PORT default for `port`
# ALERTVIEW_REFRESH_INTERVAL default for `refresh_interval`
# ALERTVIEW_CACHE_TTL default for `cache_ttl_seconds`
# ALERTVIEW_LOG_FORMAT default for `log_format`
# ALERTVIEW_CONFIG_WATCH_METHOD default for `config_watch_method`
# ALERTVIEW_CONFIG_POLL_INTERVAL default for `config_poll_interval`
# RUST_LOG log level: error, warn, info, debug, trace
#
# A value written in this file wins over the environment variable.
# ───────────────────────────────────────────────────────────────────────────
# ───────────────────────────────────────────────────────────────────────────
# URL parameters — they apply to the visit only, nothing is stored in the
# browser, so they are safe to share or to put on a wall display:
#
# ?q=team=sre filter by label (also ?q=team=sre|dba for several
# teams at once, ?q=hostname~web, ?q=team!=dba)
# ?tv=1 force TV mode ?tv=0 force it off
# ?sev=critical filter by severity ?src=Zabbix filter by source
# ?silenced=1 show silenced alerts
# ?theme=dark force a theme ?theme=auto follow the OS
# ───────────────────────────────────────────────────────────────────────────