查询监控对象工具能力清单
curl --request POST \
--url 'https://api.flashcat.cloud/monit/tools/catalog?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": 10001,
"target_locator": "web-01"
}
'import requests
url = "https://api.flashcat.cloud/monit/tools/catalog?app_key="
payload = {
"account_id": 10001,
"target_locator": "web-01"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({account_id: 10001, target_locator: 'web-01'})
};
fetch('https://api.flashcat.cloud/monit/tools/catalog?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/monit/tools/catalog?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 10001,
'target_locator' => 'web-01'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/monit/tools/catalog?app_key="
payload := strings.NewReader("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/monit/tools/catalog?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/tools/catalog?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"target": {
"kind": "host",
"locator": "web-01"
},
"tools": [
{
"name": "os.overview",
"target_kind": "host",
"description": "Returns a bounded overview of host health: CPU usage and load, memory and swap utilisation, disk and network counters, and top processes.",
"input_schema": {
"type": "object",
"additionalProperties": false,
"properties": {}
}
},
{
"name": "net.tcp_ping",
"target_kind": "host",
"description": "Checks TCP reachability of a host:port from the target, reporting connect latency.",
"input_schema": {
"type": "object",
"additionalProperties": false,
"required": [
"host",
"port"
],
"properties": {
"host": {
"type": "string"
},
"port": {
"type": "integer"
}
}
}
}
]
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}诊断分析
查询监控对象工具能力清单
根据 target_locator(host、mysql 等)查询该监控对象上 monit-agent 当前暴露的工具能力。返回每个工具的名称、描述以及 JSON-Schema input_schema。配合 /monit/tools/invoke 驱动 AI-SRE 的工具调用。
POST
/
monit
/
tools
/
catalog
查询监控对象工具能力清单
curl --request POST \
--url 'https://api.flashcat.cloud/monit/tools/catalog?app_key=' \
--header 'Content-Type: application/json' \
--data '
{
"account_id": 10001,
"target_locator": "web-01"
}
'import requests
url = "https://api.flashcat.cloud/monit/tools/catalog?app_key="
payload = {
"account_id": 10001,
"target_locator": "web-01"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({account_id: 10001, target_locator: 'web-01'})
};
fetch('https://api.flashcat.cloud/monit/tools/catalog?app_key=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flashcat.cloud/monit/tools/catalog?app_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'account_id' => 10001,
'target_locator' => 'web-01'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flashcat.cloud/monit/tools/catalog?app_key="
payload := strings.NewReader("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.flashcat.cloud/monit/tools/catalog?app_key=")
.header("Content-Type", "application/json")
.body("{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flashcat.cloud/monit/tools/catalog?app_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"account_id\": 10001,\n \"target_locator\": \"web-01\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"data": {
"target": {
"kind": "host",
"locator": "web-01"
},
"tools": [
{
"name": "os.overview",
"target_kind": "host",
"description": "Returns a bounded overview of host health: CPU usage and load, memory and swap utilisation, disk and network counters, and top processes.",
"input_schema": {
"type": "object",
"additionalProperties": false,
"properties": {}
}
},
{
"name": "net.tcp_ping",
"target_kind": "host",
"description": "Checks TCP reachability of a host:port from the target, reporting connect latency.",
"input_schema": {
"type": "object",
"additionalProperties": false,
"required": [
"host",
"port"
],
"properties": {
"host": {
"type": "string"
},
"port": {
"type": "integer"
}
}
}
}
]
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InvalidParameter",
"message": "The specified parameter is not valid."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "Unauthorized",
"message": "You are unauthorized."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "RequestTooFrequently",
"message": "Request too frequently."
}
}{
"request_id": "01HK8XQE3Z7JM2NTFQ5YJ8P9R4",
"error": {
"code": "InternalError",
"message": "We encountered an internal error, and it has been reported. Please try again later."
}
}调用限制
| 项 | 值 |
|---|---|
| 速率限制 | 600 次/分钟;10 次/秒 每账户 |
| 权限 | 任意有效的 app_key(只读;不受特定权限分类约束) |
使用说明
- 使用
target_locator标识监控对象;target_kind可选,省略时按当前监控对象路由自动推断。 - 若同一 locator 匹配多个 kind,响应为 HTTP 200,
data.error.code = "ambiguous_target_kind",并附带target_kinds列表——请带上显式的target_kind重试。 - 工具能力清单是候选能力视图,并非执行保证。目标 Agent 可能在拿到清单与发起调用之间下线,本地 Agent 策略也可能在调用时拦截某些工具。
- 每个工具条目只返回
name、target_kind、description和input_schema,不会暴露工具版本、输出契约、目录版本或执行限制。 - 业务错误(
target_unavailable、timeout、forward_failed、invalid_tool_result、ambiguous_target_kind)以 HTTP 200 返回,data.error存在且data.tools = []。只有协议、鉴权和内部错误才使用标准错误信封。 - 响应采用稀疏字段:成功时
error直接省略而非返回null;当 locator 无法唯一解析时,target不输出。tools字段恒存在。
授权
在 Flashduty 控制台 账户 → APP Key 中签发的 app_key。调用任何公开 API 时都必须携带。它等同于所属账户的身份凭证,请妥善保管。
请求体
application/json
此页面对您有帮助吗?
⌘I