Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
406 changes: 39 additions & 367 deletions api-reference/monitors.openapi.en.json

Large diffs are not rendered by default.

406 changes: 39 additions & 367 deletions api-reference/monitors.openapi.zh.json

Large diffs are not rendered by default.

406 changes: 39 additions & 367 deletions api-reference/openapi.en.json

Large diffs are not rendered by default.

50 changes: 0 additions & 50 deletions api-reference/openapi.legacy.zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -24573,56 +24573,6 @@
]
}
},
"/monit/rule/status": {
"post": {
"summary": "按分组节点直属子节点统计规则触发状态",
"deprecated": false,
"description": "以指定分组节点的每个直属子节点为维度,统计其家族(子树)下的规则总数与活跃告警规则数。子节点或规则数过多时会返回错误以自保。",
"tags": [
"Monitors/告警规则/统计"
],
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "固定值 application/json。",
"required": true,
"example": "application/json",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FolderIDRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "data 为每个直属子节点一条统计记录。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlertRuleStatusListResponse"
}
}
},
"headers": {}
}
},
"security": [
{
"apikey-query-app_key": []
}
]
}
},
"/monit/rule/counter/total": {
"post": {
"summary": "规则数量历史快照",
Expand Down
406 changes: 39 additions & 367 deletions api-reference/openapi.zh.json

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2444,7 +2444,6 @@
"POST /monit/rule/import",
"POST /monit/rule/export",
"POST /monit/rule/move",
"POST /monit/rule/status",
"POST /monit/rule/audits",
"POST /monit/rule/audit/detail",
"POST /monit/rule/dstypes",
Expand Down Expand Up @@ -2483,20 +2482,12 @@
"icon": "stethoscope",
"pages": [
"POST /monit/query/data",
"POST /monit/query/rows",
"POST /monit/query/diagnose",
"POST /monit/tools/catalog",
"POST /monit/tools/invoke",
"POST /monit/targets"
]
},
{
"group": "通用工具",
"icon": "wrench",
"pages": [
"POST /monit/preview/sync"
]
},
{
"group": "服务拓扑",
"icon": "diagram-project",
Expand Down Expand Up @@ -3814,7 +3805,6 @@
"POST /monit/rule/import",
"POST /monit/rule/export",
"POST /monit/rule/move",
"POST /monit/rule/status",
"POST /monit/rule/audits",
"POST /monit/rule/audit/detail",
"POST /monit/rule/dstypes",
Expand Down Expand Up @@ -3853,20 +3843,12 @@
"icon": "stethoscope",
"pages": [
"POST /monit/query/data",
"POST /monit/query/rows",
"POST /monit/query/diagnose",
"POST /monit/tools/catalog",
"POST /monit/tools/invoke",
"POST /monit/targets"
]
},
{
"group": "Monitor utilities",
"icon": "wrench",
"pages": [
"POST /monit/preview/sync"
]
},
{
"group": "Service map",
"icon": "diagram-project",
Expand Down
5 changes: 2 additions & 3 deletions en/developer/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,11 @@ FDUTY

### monit-query — Monitoring datasource queries

Probe monitoring back-end datasources directly, bypassing the alert-rule layer. The `data` subcommand supports 9 datasource types (Prometheus, VictoriaLogs, Loki, MySQL, SLS, Elasticsearch, PostgreSQL, Oracle, ClickHouse); `diagnose` supports `prometheus` (metric trends), `victorialogs`, `loki` (log patterns); the deprecated `rows` supports `prometheus`, `victorialogs`, `loki`, `mysql`.
Probe monitoring back-end datasources directly, bypassing the alert-rule layer. The `data` subcommand supports 9 datasource types (Prometheus, VictoriaLogs, Loki, MySQL, SLS, Elasticsearch, PostgreSQL, Oracle, ClickHouse); `diagnose` supports `prometheus` (metric trends), `victorialogs`, and `loki` (log patterns).

```bash
flashduty monit-query diagnose [flags] # Pre-clustered RCA findings (log patterns or metric trends)
flashduty monit-query data [flags] # Structured datasource query (recommended)
flashduty monit-query rows [flags] # Raw datasource passthrough query (deprecated — use data)
flashduty monit-query data [flags] # Structured datasource query
```

Common flags for `diagnose`:
Expand Down
3 changes: 1 addition & 2 deletions en/developer/go-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ Endpoints are grouped by service and hang off the client: the call convention is
| `client.NotificationTemplates` | Notification templates |
| `client.Changes` | Changes |
| `client.Diagnostics` | Diagnostics |
| `client.MonitorUtilities` | Monitor datasource preview |
| `client.ServiceMap` | Service map (ServiceMap) |
| `client.Analytics` | Analytics |
| `client.A2aAgents` | A2A Agents |
Expand All @@ -182,7 +181,7 @@ Endpoints are grouped by service and hang off the client: the call convention is

`client.Knowledge` covers the 9 operations under `/safari/knowledge/*`: on the pack side `PackReadGet` (get the account pack), `PackReadList` (list packs), `PackWriteEnsure` (ensure a pack exists), `PackWriteUpdate` (change a pack's scope), and `PackWriteDelete` (delete a pack); on the file side `FileReadGet`, `FileReadList`, `FileWritePut` (upload/overwrite), and `FileWriteDelete`. Exported types include `KnowledgePackItem`, `KnowledgeFileItem`, `KnowledgeWarning`, and the various `Knowledge*Request` / `Knowledge*Response` structs.

`client.Diagnostics` (diagnostics) provides datasource query methods: `QueryData` runs a synchronous query via `POST /monit/query/data` and returns a stable `query_result.v1` structured result (`format` is always `query_result.v1`; `result.kind` is one of `frames` / `records` / `samples`). This API requires monit-edge v0.65.0 or later. `QueryRows` (`POST /monit/query/rows`) is deprecated and returns the legacy flattened rows shape — migrate to `QueryData`. `QueryDiagnose` (`POST /monit/query/diagnose`) runs pre-clustered RCA analysis (log patterns or metric trends) and can take up to 35 seconds.
`client.Diagnostics` (diagnostics) provides datasource query methods: `QueryData` runs a synchronous query via `POST /monit/query/data` and returns a stable `query_result.v1` structured result (`format` is always `query_result.v1`; `result.kind` is one of `frames` / `records` / `samples`). This API requires monit-edge v0.65.0 or later. `QueryDiagnose` (`POST /monit/query/diagnose`) runs pre-clustered RCA analysis (log patterns or metric trends) and can take up to 35 seconds.

<Note>
All identifiers, service field names, and method names match the generated code. For exactly which methods each service has and their request and response types, rely on `services_gen.go` and the per-service files, plus the [Open API reference](/en/openapi/introduction).
Expand Down
12 changes: 2 additions & 10 deletions en/openapi/api-catalog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "API Catalog"
description: "Complete list of Flashduty Open API endpoints, organized by product module with links to detailed documentation"
---

Flashduty Open API provides **338** endpoints covering five major modules: On-call, Monitors, RUM, AI SRE, and Platform. All endpoints use unified authentication and request specifications. See [Quick Start](/en/openapi/introduction) for details.
Flashduty Open API provides **335** endpoints covering five major modules: On-call, Monitors, RUM, AI SRE, and Platform. All endpoints use unified authentication and request specifications. See [Quick Start](/en/openapi/introduction) for details.

<Note>
All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated via APP Key through query string.
Expand Down Expand Up @@ -269,7 +269,7 @@ All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated vi

</Accordion>

<Accordion title="Monitors (42 endpoints)">
<Accordion title="Monitors (39 endpoints)">

### Alert rules

Expand All @@ -285,7 +285,6 @@ All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated vi
| POST | [`/monit/rule/import`](/en/api-reference/monitors/alert-rules/monit-rule-write-import) | Import alert rules |
| POST | [`/monit/rule/export`](/en/api-reference/monitors/alert-rules/monit-rule-read-export) | Export alert rules |
| POST | [`/monit/rule/move`](/en/api-reference/monitors/alert-rules/monit-rule-write-move) | Move alert rules to folder |
| POST | [`/monit/rule/status`](/en/api-reference/monitors/alert-rules/monit-rule-write-status) | Get rule trigger status under folder |
| POST | [`/monit/rule/audits`](/en/api-reference/monitors/alert-rules/monit-rule-read-audits) | List rule change history |
| POST | [`/monit/rule/audit/detail`](/en/api-reference/monitors/alert-rules/monit-rule-read-audit-detail) | Get rule audit snapshot |
| POST | [`/monit/rule/dstypes`](/en/api-reference/monitors/alert-rules/monit-rule-read-dstypes) | List available datasource types |
Expand Down Expand Up @@ -321,18 +320,11 @@ All endpoint URLs use `https://api.flashcat.cloud` as the base, authenticated vi
| Method | Endpoint | Description |
| :--- | :--- | :--- |
| POST | [`/monit/query/data`](/en/api-reference/monitors/diagnostics/monit-read-query-data) | Query structured data |
| POST | [`/monit/query/rows`](/en/api-reference/monitors/diagnostics/monit-read-query-rows) | Query data source rows |
| POST | [`/monit/query/diagnose`](/en/api-reference/monitors/diagnostics/monit-read-query-diagnose) | Diagnose data source |
| POST | [`/monit/tools/catalog`](/en/api-reference/monitors/diagnostics/monit-read-tools-catalog) | List target tool catalog |
| POST | [`/monit/tools/invoke`](/en/api-reference/monitors/diagnostics/monit-read-tools-invoke) | Invoke target tools |
| POST | [`/monit/targets`](/en/api-reference/monitors/diagnostics/monit-read-targets-list) | List monitored targets |

### Monitor utilities

| Method | Endpoint | Description |
| :--- | :--- | :--- |
| POST | [`/monit/preview/sync`](/en/api-reference/monitors/monitor-utilities/monit-preview-sync) | Preview datasource query |

### Service map

| Method | Endpoint | Description |
Expand Down
5 changes: 2 additions & 3 deletions zh/developer/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,11 @@ FDUTY

### monit-query — 监控数据源查询

直接探测监控后端数据源,无需经过告警规则层。`data` 子命令支持 9 种数据源类型(Prometheus、VictoriaLogs、Loki、MySQL、SLS、Elasticsearch、PostgreSQL、Oracle、ClickHouse);`diagnose` 支持 `prometheus`(指标趋势)、`victorialogs``loki`(日志模式);已弃用的 `rows` 支持 `prometheus`、`victorialogs`、`loki`、`mysql`
直接探测监控后端数据源,无需经过告警规则层。`data` 子命令支持 9 种数据源类型(Prometheus、VictoriaLogs、Loki、MySQL、SLS、Elasticsearch、PostgreSQL、Oracle、ClickHouse);`diagnose` 支持 `prometheus`(指标趋势)、`victorialogs``loki`(日志模式)。

```bash
flashduty monit-query diagnose [flags] # 预聚合 RCA 分析(日志模式或指标趋势)
flashduty monit-query data [flags] # 结构化数据源查询(推荐)
flashduty monit-query rows [flags] # 原始数据直通查询(已弃用,请改用 data)
flashduty monit-query data [flags] # 结构化数据源查询
```

`diagnose` 常用参数:
Expand Down
3 changes: 1 addition & 2 deletions zh/developer/go-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ client, err := flashduty.NewClient("YOUR_APP_KEY",
| `client.NotificationTemplates` | 通知模板 |
| `client.Changes` | 变更 |
| `client.Diagnostics` | 诊断 |
| `client.MonitorUtilities` | 监控数据源预览 |
| `client.ServiceMap` | 服务拓扑(ServiceMap) |
| `client.Analytics` | 分析 |
| `client.A2aAgents` | A2A Agents |
Expand All @@ -182,7 +181,7 @@ client, err := flashduty.NewClient("YOUR_APP_KEY",

`client.Knowledge` 对应 `/safari/knowledge/*` 的 9 个 API 操作:知识包侧为 `PackReadGet`(获取账户知识包)、`PackReadList`(列出知识包)、`PackWriteEnsure`(确保知识包存在)、`PackWriteUpdate`(变更知识包作用域)、`PackWriteDelete`(删除知识包);知识文件侧为 `FileReadGet`、`FileReadList`、`FileWritePut`(上传/覆盖)、`FileWriteDelete`。相关导出类型包括 `KnowledgePackItem`、`KnowledgeFileItem`、`KnowledgeWarning` 以及各 `Knowledge*Request` / `Knowledge*Response`。

`client.Diagnostics`(诊断)提供数据源查询方法:`QueryData` 通过 `POST /monit/query/data` 执行同步查询,返回稳定的 `query_result.v1` 结构化结果(`format` 固定为 `query_result.v1`,`result.kind` 为 `frames` / `records` / `samples` 之一),该接口要求 monit-edge v0.65.0 及以上版本;`QueryRows`(`POST /monit/query/rows`)已弃用,返回历史压平的行结构,建议迁移到 `QueryData`;`QueryDiagnose`(`POST /monit/query/diagnose`)用于预聚合 RCA 分析(日志模式或指标趋势),最长运行 35 秒。
`client.Diagnostics`(诊断)提供数据源查询方法:`QueryData` 通过 `POST /monit/query/data` 执行同步查询,返回稳定的 `query_result.v1` 结构化结果(`format` 固定为 `query_result.v1`,`result.kind` 为 `frames` / `records` / `samples` 之一),该接口要求 monit-edge v0.65.0 及以上版本;`QueryDiagnose`(`POST /monit/query/diagnose`)用于预聚合 RCA 分析(日志模式或指标趋势),最长运行 35 秒。

<Note>
所有标识符、服务字段名与方法名均与生成代码保持一致。具体每个服务有哪些方法、请求与响应类型,请以 `services_gen.go` 与各服务文件,以及 [Open API 参考](/zh/openapi/introduction) 为准。
Expand Down
12 changes: 2 additions & 10 deletions zh/openapi/api-catalog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "API 目录"
description: "Flashduty Open API 接口完整列表,按产品模块组织并链接到详细文档"
---

Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。
Flashduty Open API 提供 **335** 个接口,覆盖 On-call、Monitors、RUM、AI SRE 和平台五个主要模块。所有接口使用统一认证方式和请求规范。详情参见[快速开始](/zh/openapi/introduction)。

<Note>
所有接口 URL 均以 `https://api.flashcat.cloud` 为 base,通过 query string 中的 APP Key 认证。
Expand Down Expand Up @@ -269,7 +269,7 @@ Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、

</Accordion>

<Accordion title="Monitors(42 个接口)">
<Accordion title="Monitors(39 个接口)">

### 告警规则

Expand All @@ -285,7 +285,6 @@ Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、
| POST | [`/monit/rule/import`](/zh/api-reference/monitors/alert-rules/monit-rule-write-import) | 导入告警规则 |
| POST | [`/monit/rule/export`](/zh/api-reference/monitors/alert-rules/monit-rule-read-export) | 导出告警规则 |
| POST | [`/monit/rule/move`](/zh/api-reference/monitors/alert-rules/monit-rule-write-move) | 移动告警规则到文件夹 |
| POST | [`/monit/rule/status`](/zh/api-reference/monitors/alert-rules/monit-rule-write-status) | 查看文件夹下规则触发状态 |
| POST | [`/monit/rule/audits`](/zh/api-reference/monitors/alert-rules/monit-rule-read-audits) | 查询规则变更历史 |
| POST | [`/monit/rule/audit/detail`](/zh/api-reference/monitors/alert-rules/monit-rule-read-audit-detail) | 查看规则审计快照 |
| POST | [`/monit/rule/dstypes`](/zh/api-reference/monitors/alert-rules/monit-rule-read-dstypes) | 查询可用的数据源类型 |
Expand Down Expand Up @@ -321,18 +320,11 @@ Flashduty Open API 提供 **338** 个接口,覆盖 On-call、Monitors、RUM、
| 方法 | 接口 | 描述 |
| :--- | :--- | :--- |
| POST | [`/monit/query/data`](/zh/api-reference/monitors/diagnostics/monit-read-query-data) | 查询结构化数据 |
| POST | [`/monit/query/rows`](/zh/api-reference/monitors/diagnostics/monit-read-query-rows) | 查询数据源原始行 |
| POST | [`/monit/query/diagnose`](/zh/api-reference/monitors/diagnostics/monit-read-query-diagnose) | 数据源诊断 |
| POST | [`/monit/tools/catalog`](/zh/api-reference/monitors/diagnostics/monit-read-tools-catalog) | 查询监控对象工具能力清单 |
| POST | [`/monit/tools/invoke`](/zh/api-reference/monitors/diagnostics/monit-read-tools-invoke) | 调用监控对象工具 |
| POST | [`/monit/targets`](/zh/api-reference/monitors/diagnostics/monit-read-targets-list) | 监控对象列表 |

### 通用工具

| 方法 | 接口 | 描述 |
| :--- | :--- | :--- |
| POST | [`/monit/preview/sync`](/zh/api-reference/monitors/monitor-utilities/monit-preview-sync) | 同步预览数据源查询 |

### 服务拓扑

| 方法 | 接口 | 描述 |
Expand Down
Loading