| 1 |
# magicmirror: which daemons to watch. |
| 2 |
# |
| 3 |
# Install at ~/.config/magicmirror/magicmirror.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. magicmirror knows |
| 7 |
# nothing about tiers, gates, apps or targets; it renders whatever the source |
| 8 |
# emits. A new producer gets a UI by emitting the payload. |
| 9 |
# |
| 10 |
# A source sets exactly one of `url` and `path`. `url` is a daemon to poll, with |
| 11 |
# /status.json appended. `path` is a payload on disk, which is what a batch |
| 12 |
# producer leaves behind: something that runs for hours and then stops has |
| 13 |
# nothing to poll, and making it grow an HTTP listener would be paying a |
| 14 |
# daemon's cost for a producer that is not one. Either way magicmirror keeps the |
| 15 |
# last payload it read across a failed poll, so a producer that finished at 03:20 |
| 16 |
# still reads at 15:00. |
| 17 |
# |
| 18 |
# magicmirror is read-only until a source sets allow_actions = true. A source |
| 19 |
# with it off still shows the actions its nodes declare; it just refuses to |
| 20 |
# fire them. With it on, Enter on a node opens a picker of that node's actions; |
| 21 |
# a plain action fires, a confirm action asks for 'y', and a danger action |
| 22 |
# (sando's rollback-b) asks you to type its key. This keeps magicmirror that is |
| 23 |
# merely pointed at a daemon from ever moving it by accident. |
| 24 |
|
| 25 |
# Age past which a source's answer stops counting as current, for any source |
| 26 |
# that does not set its own. A source that answers with something hours old is |
| 27 |
# reported as degraded no matter how green its contents: the failure this |
| 28 |
# whole surface exists to catch is a check that kept saying "ok" about a |
| 29 |
# snapshot nobody had refreshed in forty days. |
| 30 |
stale_after_secs = 60 |
| 31 |
|
| 32 |
# Which theme to render in. Unset means follow the terminal: magicmirror reads |
| 33 |
# COLORFGBG and picks a light or dark theme to match, so it does not paint a |
| 34 |
# light palette onto a night session. Set it to a theme id to pin one instead, |
| 35 |
# e.g. "makenotwork", "carbonfox", "nord". Own themes go in |
| 36 |
# ~/.config/magicmirror/themes/ and outrank the bundled set of the same id. |
| 37 |
# |
| 38 |
# theme = "system" |
| 39 |
|
| 40 |
# Each URL below is the address that daemon's own deploy example binds, which is |
| 41 |
# the file to check when a source reads as unreachable. A daemon bound to |
| 42 |
# loopback is only visible to magicmirror on the same host. |
| 43 |
# |
| 44 |
# A tailnet bind is necessary but not sufficient for magicmirror on another machine: |
| 45 |
# the tailnet ACL decides separately whether that machine may open the port. As |
| 46 |
# of 2026-07-29 the ACL is one-directional between the user-owned hosts and the |
| 47 |
# tagged ones, so magicmirror on astra cannot reach fw13's daemons at any port even |
| 48 |
# though both sit on the tailnet. Check the ACL, not just `listen`, when a source |
| 49 |
# reads unreachable from one host and fine from another. |
| 50 |
[[source]] |
| 51 |
name = "sando" |
| 52 |
# Matches `listen` in sando/deploy/sando-daemon.toml.example: fw13's tailnet |
| 53 |
# address, deliberately not 0.0.0.0, and reachable from fw13 itself. |
| 54 |
url = "http://100.103.89.95:7766" |
| 55 |
# Sando gates its reads, so a token is required. The token is NAMED here, never |
| 56 |
# pasted: this file describes topology and has every reason to be readable, |
| 57 |
# while sandod already takes the same value from its environment. |
| 58 |
token_env = "SANDO_API_TOKEN" |
| 59 |
poll_secs = 5 |
| 60 |
# Sando declares promote and rollback actions that move production. Leave this |
| 61 |
# off to watch read-only; turn it on deliberately to drive deploys from here. |
| 62 |
# allow_actions = true |
| 63 |
|
| 64 |
[[source]] |
| 65 |
name = "bento" |
| 66 |
# Matches `listen` in bento/deploy/bento-daemon.toml.example. Loopback, so this |
| 67 |
# source only works for magicmirror running on the same host as bentod. magicmirror |
| 68 |
# elsewhere needs bentod moved to its tailnet address, which turns its auth on. |
| 69 |
url = "http://127.0.0.1:8765" |
| 70 |
# Bento leaves its reads open, so no token is needed. Set token_env anyway if |
| 71 |
# that ever changes; an unset variable is treated as no token. |
| 72 |
poll_secs = 10 |
| 73 |
|
| 74 |
# PoM polls its own targets on a slower cycle, so hold it to a slower staleness |
| 75 |
# limit rather than flagging it degraded between its own checks. Each target PoM |
| 76 |
# watches is a node; the rollup shows the worst of them. PoM gates /status.json |
| 77 |
# behind the same bearer token as its /api/* reads, so name the token here — it |
| 78 |
# is the value in pom's serve.api_token, supplied to magicmirror via the |
| 79 |
# environment, never pasted into this file. |
| 80 |
[[source]] |
| 81 |
name = "pom" |
| 82 |
# PoM listens on 9100, never 9000, and there is no host named "pom" to resolve. |
| 83 |
# Point this at the instance you want: astra's tailnet address below, or |
| 84 |
# 127.0.0.1:9100 for a pom running on this machine. See pom/deploy/pom-*.toml. |
| 85 |
url = "http://100.106.221.39:9100" |
| 86 |
token_env = "POM_API_TOKEN" |
| 87 |
poll_secs = 30 |
| 88 |
stale_after_secs = 600 |
| 89 |
|
| 90 |
# witchbroom: the nightly repo x check sweep on astra. A batch producer, so this |
| 91 |
# is a file rather than a URL — it writes its payload at the end of a run and |
| 92 |
# stops. The path is witchbroom's own `status_path` default; change both or |
| 93 |
# neither. Only useful for a magicmirror on astra, since the file is local. |
| 94 |
# |
| 95 |
# A file source takes no token_env and no allow_actions: there is nothing to |
| 96 |
# authenticate to and no base to resolve an action's URL against. Both are |
| 97 |
# refused at load rather than ignored. |
| 98 |
# |
| 99 |
# stale_after_secs is a day and a half, not sixty seconds. The sweep runs |
| 100 |
# nightly, so anything shorter reports it degraded for twenty-three hours out of |
| 101 |
# every twenty-four; a day and a half is "it missed a night", which is the thing |
| 102 |
# actually worth seeing. |
| 103 |
[[source]] |
| 104 |
name = "witchbroom" |
| 105 |
path = "~/.local/state/witchbroom/status.json" |
| 106 |
poll_secs = 60 |
| 107 |
stale_after_secs = 129600 |
| 108 |
|