- 介绍
- /api/n9e 接口
- 告警规则
- 订阅规则
- 屏蔽规则
- 告警事件
- 通知规则
- 机器列表
- 团队管理
- 业务组管理
- 用户管理
- 权限管理
- 采集配置
- 网络设备
- 告警管理
- 指标视图
- 告警自愈
- 采集配置
- 网络设备
- pingmesh
- pingmesh-idc网络规则注册
- pingmesh-idc网络规则修改
- pingmesh-idc网络规则查询
- pingmesh-idc网络规则删除
- pingmesh-idc间ping规则配置注册
- pingmesh-idc间ping规则配置查看
- pingmesh-idc间ping规则配置修改
- pingmesh-idc间ping规则配置删除
- pingmesh-ping动作开关设置
- pingmesh-ping动作开关查询
- pingmesh-idc之间拓扑图
- pingmesh-idc内netident拓扑
- pingmesh-netident内server之间拓扑
- pingmesh-查询指标历史数据
- pingmesh-idc网络规则注册(From CMDB)
- pingmesh-报警规则导出
- 数据查询
- 仪表盘
- 模板中心
- 拨测任务API
- 集成仪表盘
- 审计管理
- 数据源
- 全局屏蔽
- 仪表盘标注
- 通知媒介
- 消息模板
- auth认证
- metricsDesc
- 通知配置-待下线
- 快捷视图(指标)
- 变量设置
- 单点登陆
- 用户信息--待删除(与用户管理重复)
- /v1/n9e 接口
创建拨测任务
开发中
PUT
https://api.flashcat.cloud/api/n9e-plus/probe/task/create
最后修改时间:2024-07-25 02:29:19
1.
protocol
(整数值)2.
config
3.
targets
多个拨测对象,用'\n'分隔开 (如: "www.baidu.com\nwww.qq.com")4.
method
(GET 、POST、HEAD)5.
expect_response_codes
(格式: 200 或 2xx 或 2xx|3xx|4xx|5xx)6.
expect_response_string
根据返回body内容,进行匹配的内容7.
match_pattern
8.
period
(单位: 秒)9.
connect_timeout
(单位: 秒)10.
timeout
(单位: 秒)11.
probe_hosts
{"机器Ident1":{"labels":"a=b, c=d"}, "机器Ident2" :{"labels":"w=q"}}
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
name
string
必需
description
string
必需
busi_group
integer
必需
labels
string
必需
protocol
integer
必需
method
string
必需
encoding
string
必需
config
object
必需
follow_redirects
boolean
必需
insecure_skip_verify
boolean
必需
probe_host_percent
integer
必需
targetType
integer
必需
targets
string
必需
header
string
必需
body
string
必需
param
string
必需
expect_response_codes
string
必需
match_pattern
string
必需
expect_response_string
string
必需
periodPiece
string
必需
period
integer
必需
timeout
integer
必需
connect_timeout
integer
必需
probe_hosts
object
必需
dev-n9e-01
object
必需
zke-categraf-test
object
必需
示例
{
"name": "任务测试",
"description": "",
"busi_group": 37,
"labels": "custom=abc,task=probe",
"protocol": 0,
"method": "GET",
"encoding": "utf8",
"config": {
"follow_redirects": true,
"insecure_skip_verify": false,
"probe_host_percent": 100
},
"targets": "http://www.baidu.com",
"header": "Auth: xx2xx",
"body": "{}",
"param": "a=b&c=d",
"expect_response_codes": "2xx",
"match_pattern": "substring",
"expect_response_string": "\"status\": \"ok\"",
"periodPiece": "second",
"period": 10,
"timeout": 10,
"connect_timeout": 10,
"probe_hosts": {
"dev-n9e-01": {
"labels": "test=host",
},
"zke-categraf-test": {
"labels": "",
"busi_group": ""
}
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.flashcat.cloud/api/n9e-plus/probe/task/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "任务测试",
"description": "",
"busi_group": 37,
"labels": "custom=abc,task=probe",
"protocol": 0,
"method": "GET",
"encoding": "utf8",
"config": {
"follow_redirects": true,
"insecure_skip_verify": false,
"probe_host_percent": 100
},
"targets": "http://www.baidu.com",
"header": "Auth: xx2xx",
"body": "{}",
"param": "a=b&c=d",
"expect_response_codes": "2xx",
"match_pattern": "substring",
"expect_response_string": "\"status\": \"ok\"",
"periodPiece": "second",
"period": 10,
"timeout": 10,
"connect_timeout": 10,
"probe_hosts": {
"dev-n9e-01": {
"labels": "test=host",
},
"zke-categraf-test": {
"labels": "",
"busi_group": ""
}
}
}'
返回响应
🟢200成功
application/json
Body
error
object (DutyError)
错误信息,仅出错时存在
code
enum<string>
错误码
枚举值:
InvalidParameterInvalidContentTypeUnauthorizedAccessDeniedMethodNotAllowedRequestTooFrequentlyRequestVerifyRequiredDangerousOperationRequestLockedRouteNotFoundBalanceNotEnoughUndonedOrderExistResourceNotFoundInternalErrorReferenceExist
message
string
错误描述
request_id
string
请求ID,用于问题追踪
示例
{
"error": {
"code": "InvalidParameter",
"message": "string"
},
"request_id": "string"
}

添加官方技术人员微信
在这里,获得使用上的任何帮助,快速上手企业告警一站式响应平台FlashDuty


修改于 2024-07-25 02:29:19