Skip to content

Commit a8e8d3e

Browse files
committed
fix(skill): enumerate configured rules via rule-list-basic --folder-id 0, never via fired alerts
`rule-counter-status` 400s "too many rules" on large accounts, and a guessed `--folder-id N` 400s "Folder not found". With both paths blocked, a prod agent fell back to FIRED alerts (`insight top-alerts 90d`) as a proxy for CONFIGURED rules and produced a confidently-wrong coverage report — marking P0 checks as "missing" when it had only verified them as not-fired-in-90d. The enumerate-all path already exists: `rule-list-basic --folder-id 0` returns every configured rule with no folder id needed. Make it the documented path, add the two-error fallback, and add a hard CONFIGURED != FIRED warning. monit.md only (skill card; edits are outside the GENERATED fence). Note: `rule-counter-status` itself cannot be scoped/paginated from the CLI — the SDK `ReadCounterStatus(ctx)` and `POST /monit/rule/counter/status` take no params; making it not 400 on large accounts is backend work, out of scope here. Surfaced by /audit-ai-sre-sessions (run audit-2026-06-26): sess_DiRDzjygi4NuYyAcsgzB6o.
1 parent 78b3361 commit a8e8d3e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

skills/flashduty/reference/monit.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,20 @@ fduty monit tools-invoke --target-locator <hostname-or-ip> --output-format toon
6868
EOF
6969
```
7070

71+
## Hot flow — enumerate ALL configured rules (coverage / completeness)
72+
73+
```bash
74+
# rule-list-basic with folder 0 returns EVERY configured rule — no folder id needed.
75+
fduty monit rule-list-basic --folder-id 0 --output-format json \
76+
| jq '[.[] | {id, name, ds_type, enabled, triggered, folder_id}]'
77+
78+
# Is a specific rule configured? Filter the full list by name / datasource:
79+
fduty monit rule-list-basic --folder-id 0 --output-format json \
80+
| jq '[.[] | select(.name | test("emqx"; "i"))]'
81+
```
82+
83+
**CONFIGURED ≠ FIRED.** The authoritative list of what rules *exist* is `rule-list-basic --folder-id 0`. Never infer rule coverage from *fired* alerts (`insight top-alerts`, alert feeds): "not fired in 90d" does **not** mean "not configured", and reporting a rule as missing on that basis is confidently wrong. Fired-alert queries answer "what is noisy", not "what is monitored".
84+
7185
<!-- GENERATED:monit START · 由 fduty __dump-commands 同步 · 勿手改 fence 内 -->
7286

7387
### datasource-create
@@ -330,6 +344,7 @@ Invoke target tools
330344
- **`tools-catalog` / `tools-invoke` `--target-locator` is required and not guessable.** If the user has not provided a host or IP, ask — do not invent one. Tool names in `invoke` must come from the `tools-catalog` response — never hallucinate them.
331345
- **`rule-delete-batch` and `datasource-delete` are irreversible.** Confirm IDs with `rule-list-basic` / `datasource-info` first.
332346
- **`rule-audit-detail --id` takes the audit record ID**, not the rule ID. Get audit record IDs from `rule-audits --id <rule-id>` first; passing the rule ID returns HTTP 400.
347+
- **To list every configured rule, use `rule-list-basic --folder-id 0`** — no folder id needed. `rule-counter-status` 400s "too many rules" on large accounts, and a guessed `--folder-id N` 400s "Folder not found"; neither is a dead end — fall through to `--folder-id 0`. Do **not** substitute fired-alert queries (`insight top-alerts`) to infer which rules exist (see the enumerate-all hot flow).
333348

334349
## Worked example — inspect a firing rule then batch-disable it
335350

0 commit comments

Comments
 (0)