Skip to main content

max / makenotwork

2.4 KB · 55 lines History Blame Raw
1 # ops-viewer: which daemons to watch.
2 #
3 # Install at ~/.config/ops-viewer/viewer.toml, or pass a path as the first
4 # argument, or set $OPS_VIEWER_CONFIG.
5 #
6 # Adding a service is an edit to this file and nothing else. The viewer knows
7 # nothing about tiers, gates, apps or targets; it renders whatever the source
8 # emits at GET /status.json. A new daemon gets a UI by emitting the payload.
9 #
10 # The viewer is read-only until a source sets allow_actions = true. A source
11 # with it off still shows the actions its nodes declare; it just refuses to
12 # fire them. With it on, Enter on a node opens a picker of that node's actions;
13 # a plain action fires, a confirm action asks for 'y', and a danger action
14 # (sando's rollback-b) asks you to type its key. This keeps a viewer that is
15 # merely pointed at a daemon from ever moving it by accident.
16
17 # Age past which a source's answer stops counting as current, for any source
18 # that does not set its own. A source that answers with something hours old is
19 # reported as degraded no matter how green its contents: the failure this
20 # whole surface exists to catch is a check that kept saying "ok" about a
21 # snapshot nobody had refreshed in forty days.
22 stale_after_secs = 60
23
24 [[source]]
25 name = "sando"
26 url = "http://fw13:8080"
27 # Sando gates its reads, so a token is required. The token is NAMED here, never
28 # pasted: this file describes topology and has every reason to be readable,
29 # while sandod already takes the same value from its environment.
30 token_env = "SANDO_API_TOKEN"
31 poll_secs = 5
32 # Sando declares promote and rollback actions that move production. Leave this
33 # off to watch read-only; turn it on deliberately to drive deploys from here.
34 # allow_actions = true
35
36 [[source]]
37 name = "bento"
38 url = "http://fw13:8090"
39 # Bento leaves its reads open, so no token is needed. Set token_env anyway if
40 # that ever changes; an unset variable is treated as no token.
41 poll_secs = 10
42
43 # PoM polls its own targets on a slower cycle, so hold it to a slower staleness
44 # limit rather than flagging it degraded between its own checks. Each target PoM
45 # watches is a node; the rollup shows the worst of them. PoM gates /status.json
46 # behind the same bearer token as its /api/* reads, so name the token here — it
47 # is the value in pom's serve.api_token, supplied to the viewer via the
48 # environment, never pasted into this file.
49 [[source]]
50 name = "pom"
51 url = "http://pom:9000"
52 token_env = "POM_API_TOKEN"
53 poll_secs = 30
54 stale_after_secs = 600
55