Skip to content

feat(monit-query): add data command, deprecate rows - #151

Merged
ysyneu merged 1 commit into
mainfrom
feat/monit-query-data
Aug 16, 2026
Merged

feat(monit-query): add data command, deprecate rows#151
ysyneu merged 1 commit into
mainfrom
feat/monit-query-data

Conversation

@ysyneu

@ysyneu ysyneu commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

变更

新命令 fduty monit-query data — 结构化查询 POST /monit/query/data,返回稳定 query_result.v1(frames/records/samples):

  • 参数与 rows 一致(--ds-type/--ds-name/--expr 必填、--args 重复 KV),新增 --delay-seconds
  • ds-type 枚举覆盖全部 9 种数据源;loki/victorialogs raw 时间参数归一化复用。

rows 标记 Deprecated(运行时有 warning 提示迁移),并行期保留可用。

SDK bump v0.12.0 → v0.13.1

  • 适配 FollowPreference *bool:给定了 --notify-channel 时显式发 follow_preference=false(新服务端契约下频道生效);仅 --template-id 时保持服务端默认(个人偏好),不会静默抑制通知;
  • cligen 重新生成 + skill 卡片刷新(新增 data 卡片段,rows 标注弃用)。

验证

  • go build / go vet / go test ./... 全绿
  • go run ./internal/cmd/skilldoc check cards OK
  • 单测覆盖:data happy path(wire 断言 delay_seconds/args、输出 envelope)、必填参数矩阵(断言零请求)、畸形 --args、时间归一化

- New curated 'monit-query data' for the structured /monit/query/data
  endpoint (query_result.v1: frames/records/samples); flags mirror the
  rows command plus --delay-seconds, ds-type enum covers all 9 sources.
- 'monit-query rows' marked Deprecated (runtime warning), kept for the
  migration period.
- Bump go-flashduty v0.12.0 -> v0.13.1: adopt the *bool notification
  fields (explicit follow_preference=false sent whenever channels are
  given; template-only keeps the server default) and regenerate the
  command layer + skill cards.
- monit-query card routes agents to data; rows documented as migration
  fallback.
@ysyneu
ysyneu merged commit e783925 into main Aug 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant