Cutsheet trace mode and mismatch alerts
Lint / Python (flake8) (push) Successful in 1m8s
Security / Python Security (bandit) (push) Successful in 56s
Test / Python Tests (pytest) (push) Successful in 43s
Lint / Python (flake8) (pull_request) Successful in 50s
Lint / JS (eslint) (pull_request) Successful in 30s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 55s
Test / Python Tests (pytest) (pull_request) Successful in 50s
Lint / JS (eslint) (push) Successful in 16m17s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Lint / Python (flake8) (push) Successful in 1m8s
Security / Python Security (bandit) (push) Successful in 56s
Test / Python Tests (pytest) (push) Successful in 43s
Lint / Python (flake8) (pull_request) Successful in 50s
Lint / JS (eslint) (pull_request) Successful in 30s
Lint / Notify on failure (pull_request) Skipped
Lint / Deploy (pull_request) Skipped
Security / Python Security (bandit) (pull_request) Successful in 55s
Test / Python Tests (pytest) (pull_request) Successful in 50s
Lint / JS (eslint) (push) Successful in 16m17s
Lint / Notify on failure (push) Skipped
Lint / Deploy (push) Skipped
Trace a cord: pick a panel port, press Start, and unplug the cord at the panel. The page polls a new admin-only endpoint that reads every switch port's state from UniFi (cached 2 s), shows the one port that dropped with a button to record the cable, and confirms when it's plugged back in. Several ports dropping at once, or none within 3 minutes, is explained rather than guessed at. Mismatch alerts: the monitor runs the cutsheet check every poll. Each mismatched installed run (wrong neighbor, no link, missing port, port conflict) keeps one cable_mismatch event on its switch, resolved when fixed, and opens a P4 ticket after cutsheet.mismatch_ticket_hours (default 24, 0 never). Suppressing the switch or port stops the ticket. Also fixes buttons with the hidden attribute still showing, which left a Delete button on the new-cable form. Closes #12 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cd602fdacf
commit
86aa29b378
11 files changed
+446
-1
No files matched your search
@@ -213,6 +213,14 @@ can view it; only the `admin` group can edit, and every change is logged with wh
|
||||
- **CSV**: export, and import that adds or updates cables by ID. A file with any invalid row imports
|
||||
nothing.
|
||||
- Cables, panels and jacks are included in the dashboard search.
|
||||
- **Trace a cord** (admins): pick a panel port and press Start, then unplug that cord at the panel.
|
||||
Gandalf reads every switch port's state from UniFi every 3 seconds and shows the one that drops,
|
||||
with a button to record the cable, then confirms when it's plugged back in. The device on that
|
||||
port loses its link for those seconds. A cord whose far end has nothing linked can't be traced
|
||||
this way.
|
||||
- **Mismatch alerts**: the monitor runs the same check every poll. A mismatched run opens a
|
||||
`cable_mismatch` event on the switch straight away and resolves it once fixed; it becomes a P4
|
||||
ticket only after `cutsheet.mismatch_ticket_hours`.
|
||||
|
||||
### Suppressions (`/suppressions`)
|
||||
- Create timed (30 min / 1 hr / 4 hr / 8 hr) or manual suppressions
|
||||
@@ -243,6 +251,7 @@ can view it; only the `admin` group can edit, and every change is logged with wh
|
||||
| Modem pages unreadable, e.g. after a firmware update (≥`modem.failure_threshold`) | P3 |
|
||||
| UniFi logs that Smart Power auto power-cycled the modem | P3 |
|
||||
| UniFi logs that the WAN failed multiple times in 24 hours (at most one ticket a day) | P2 |
|
||||
| An installed cable doesn't match the cutsheet (wrong neighbor, no link, missing port, port conflict) for `cutsheet.mismatch_ticket_hours` | P4 |
|
||||
|
||||
A failed Pulse ping check counts as "unknown": it neither raises nor resolves `host_unreachable`.
|
||||
|
||||
@@ -332,6 +341,9 @@ Shared by both processes. Located in the working directory (`/var/www/html/prod/
|
||||
{ "name": "pbs", "ip": "10.10.10.3" }
|
||||
]
|
||||
},
|
||||
"cutsheet": {
|
||||
"mismatch_ticket_hours": 24
|
||||
},
|
||||
"modem": {
|
||||
"url": "http://192.168.1.254",
|
||||
"name": "att-modem"
|
||||
@@ -361,6 +373,7 @@ Shared by both processes. Located in the working directory (`/var/www/html/prod/
|
||||
| `monitor.unifi_failure_threshold` | Consecutive failures before ticketing a UniFi device as offline (default: same as `failure_threshold`). Set higher than `failure_threshold` — UniFi switches/APs can take several minutes to rejoin after a firmware-update reboot, so a low threshold cuts tickets for momentary maintenance reboots instead of real failures. |
|
||||
| `monitor.cluster_threshold` | Hosts with failures to trigger cluster-wide P1 (default: 3) |
|
||||
| `monitor.ping_hosts` | Hosts checked only by ping (no node_exporter) |
|
||||
| `cutsheet.mismatch_ticket_hours` | Hours a cutsheet mismatch must last before it opens a P4 ticket (default: 24; `0` never tickets). The mismatch shows on the dashboard and the switch's page straight away, so recabling never pages anyone. Suppressing the switch or its port also stops the ticket. |
|
||||
| `modem.url` | AT&T gateway base URL. Omit the `modem` block to disable modem monitoring. Must be reachable from the monitor host. |
|
||||
| `modem.name` | Name used for the modem's alerts, tickets, and suppressions (default: `att-modem`) |
|
||||
| `modem.timeout` | Seconds to wait per status page (default: 10) |
|
||||
|
||||
Reference in new issue
Block a user