detached 759791c

fix(wiki): address review feedback on health monitoring guide

- Remove 2>&1 from command substitution to avoid corrupting JSON with stderr
- Replace hardcoded datetime in example output with format placeholder
- Replace --remote/--token references with saved remotes (gordon remotes use)
commit
759791cdf9263bd477b94464da6c92c192faff50
author
brice · · 2026-03-24 05:34 UTC
parent
e7e0b7a
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
1 file · +8 -6
M wiki/guides/health-monitoring.md +8 -6
@@ -8,7 +8,7 @@ Monitor your Gordon routes and get desktop notifications when something goes dow
88 - `jq` and `notify-send` (libnotify) available
99 - systemd user session (most Linux desktops)
1010
11-For remote instances, pass `--remote` and `--token` to the gordon command (see [Remote CLI Management](./remote-cli.md)).
11+For remote instances, configure a saved remote with `gordon remotes add` and `gordon remotes use` (see [Remote CLI Management](./remote-cli.md)). The CLI uses the active remote automatically.
1212
1313 ---
1414
@@ -21,10 +21,12 @@ Create `~/.local/bin/gordon-watchdog.sh`:
2121 set -euo pipefail
2222
2323 GORDON_CMD="gordon routes list --json"
24-# For remote monitoring, use:
25-# GORDON_CMD="gordon routes list --json --remote https://gordon.example.com --token $GORDON_TOKEN"
24+# For remote monitoring, configure a saved remote first:
25+# gordon remotes add myserver https://gordon.example.com --token-env GORDON_TOKEN
26+# gordon remotes use myserver
27+# The CLI then targets the remote automatically.
2628
27-json=$($GORDON_CMD 2>&1) || {
29+json=$($GORDON_CMD) || {
2830 notify-send -u critical "Gordon Watchdog" "Cannot reach Gordon"
2931 exit 1
3032 }
@@ -79,7 +81,7 @@ Test it:
7981
8082 ```bash
8183 ~/.local/bin/gordon-watchdog.sh
82-# Expected: [2024-01-15T10:30:00+01:00] OK: all routes healthy
84+# Expected: [YYYY-MM-DDThh:mm:ss+00:00] OK: all routes healthy
8385 ```
8486
8587 ## What Gets Flagged
@@ -173,7 +175,7 @@ if [[ "$http_status" -ne 200 ]]; then
173175 fi
174176 ```
175177
176-**Remote monitoring**: set `GORDON_CMD` to include `--remote` and `--token` flags, or export `GORDON_TOKEN` as an environment variable in the service unit.
178+**Remote monitoring**: configure a saved remote with `gordon remotes add` and `gordon remotes use`. The script picks it up automatically from `~/.config/gordon/remotes.toml`.
177179
178180 ---
179181
@@ -8,7 +8,7 @@ Monitor your Gordon routes and get desktop notifications when something goes dow
8 - `jq` and `notify-send` (libnotify) available8 - `jq` and `notify-send` (libnotify) available
9 - systemd user session (most Linux desktops)9 - systemd user session (most Linux desktops)
10 10
11-For remote instances, pass `--remote` and `--token` to the gordon command (see [Remote CLI Management](./remote-cli.md)).11+For remote instances, configure a saved remote with `gordon remotes add` and `gordon remotes use` (see [Remote CLI Management](./remote-cli.md)). The CLI uses the active remote automatically.
12 12
13 ---13 ---
14 14
@@ -21,10 +21,12 @@ Create `~/.local/bin/gordon-watchdog.sh`:
21 set -euo pipefail21 set -euo pipefail
22 22
23 GORDON_CMD="gordon routes list --json"23 GORDON_CMD="gordon routes list --json"
24-# For remote monitoring, use:24+# For remote monitoring, configure a saved remote first:
25-# GORDON_CMD="gordon routes list --json --remote https://gordon.example.com --token $GORDON_TOKEN"25+# gordon remotes add myserver https://gordon.example.com --token-env GORDON_TOKEN
26+# gordon remotes use myserver
27+# The CLI then targets the remote automatically.
26 28
27-json=$($GORDON_CMD 2>&1) || {29+json=$($GORDON_CMD) || {
28 notify-send -u critical "Gordon Watchdog" "Cannot reach Gordon"30 notify-send -u critical "Gordon Watchdog" "Cannot reach Gordon"
29 exit 131 exit 1
30 }32 }
@@ -79,7 +81,7 @@ Test it:
79 81
80 ```bash82 ```bash
81 ~/.local/bin/gordon-watchdog.sh83 ~/.local/bin/gordon-watchdog.sh
82-# Expected: [2024-01-15T10:30:00+01:00] OK: all routes healthy84+# Expected: [YYYY-MM-DDThh:mm:ss+00:00] OK: all routes healthy
83 ```85 ```
84 86
85 ## What Gets Flagged87 ## What Gets Flagged
@@ -173,7 +175,7 @@ if [[ "$http_status" -ne 200 ]]; then
173 fi175 fi
174 ```176 ```
175 177
176-**Remote monitoring**: set `GORDON_CMD` to include `--remote` and `--token` flags, or export `GORDON_TOKEN` as an environment variable in the service unit.178+**Remote monitoring**: configure a saved remote with `gordon remotes add` and `gordon remotes use`. The script picks it up automatically from `~/.config/gordon/remotes.toml`.
177 179
178 ---180 ---
179 181

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close