1. 接口描述
接口请求域名: emr.tencentcloudapi.com 。
设置巡检任务配置
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:ModifyInspectionSettings。 |
Version | 是 | String | 公共参数,本接口取值:2019-01-03。 |
Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
InstanceId | 是 | String | 实例ID 示例值:emr-mwyixwxp |
Type | 是 | String | 巡检类型,FixedTime/RealTime 示例值:RealTime |
Settings.N | 是 | Array of InspectionTaskSettings | 任务配置 示例值:[{ "Name": "元数据库异常", "Group": "节点", "TaskType": "MetaDBPingFail", "Selected": "true", "TaskSettings": [] }] |
StartTime | 否 | Integer | 开始时间戳 示例值:1741795200 |
EndTime | 否 | Integer | 结束时间戳 示例值:1741837980 |
Strategy | 否 | String | 巡检周期,eg EveryDay EveryWeek EveryMonth 示例值:None |
Clock | 否 | String | 每天的开始的时间 示例值:15:04:05 |
DayOfWeek | 否 | String | 每周的周几 示例值:1 |
DayOfMonth | 否 | String | 每月的第几号 示例值:2 |
JobId | 否 | String | 巡检作业Id 示例值:500 |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
Info | String | 返回值描述 示例值:OK |
JobId | String | 返回成功修改的巡检任务Id 示例值:110187 |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 设置巡检任务配置
输入示例
POST / HTTP/1.1
Host: emr.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyInspectionSettings
{
"StartTime": 1741795200,
"EndTime": 1741837980,
"InstanceId": "emr-mwyixwxp",
"Type": "RealTime",
"Settings": [
{
"Name": "CPU利用率连续高于阈值",
"Group": "节点",
"TaskType": "CpuUsageMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "CPU IOwait平均值高于阈值",
"Group": "节点",
"TaskType": "CpuIOWaitAvgMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "60",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "内存使用率持续高于阈值",
"Group": "节点",
"TaskType": "MemoryFreeException",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "系统进程总数连续高于阈值",
"Group": "节点",
"TaskType": "ProcessCntMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "10000",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "元数据库异常",
"Group": "节点",
"TaskType": "MetaDBPingFail",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "HDFS存储空间使用率持续高于阈值",
"Group": "HDFS",
"TaskType": "HDFSCapacityUsedRateMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "NameNode 发生主备切换",
"Group": "HDFS",
"TaskType": "HDFSNameNodeSwitch",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "NameNode 发生full GC",
"Group": "HDFS",
"TaskType": "NameNodeFullGC",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "NameNode JVM内存使用率持续高于阈值",
"Group": "HDFS",
"TaskType": "NameNodeJvmMemoryUsageMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "ResourceManager 发生主备切换",
"Group": "YARN",
"TaskType": "YarnRMSwitch",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "ResourceManager 发生full GC",
"Group": "YARN",
"TaskType": "YarnRmFullGCMoreThanThreshold",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "ResourceManager JVM内存使用率持续高于阈值",
"Group": "YARN",
"TaskType": "YarnRmJvmMemoryUsageMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "RM JVM内存使用率",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "集群处于RIT Region个数持续高于阈值",
"Group": "HBASE",
"TaskType": "HbaseRitRegionNumMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "Rit Region个数",
"Value": "1",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "60",
"Editable": "true"
}
]
},
{
"Name": "HMaster JVM内存使用率持续高于阈值",
"Group": "HBASE",
"TaskType": "HbaseHmJvmMemoryUsageMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "HMaster JVM内存使用率",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "HiveServer2 发生full GC",
"Group": "HIVE",
"TaskType": "HiveServer2FullGC",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "HiveServer2 JVM内存使用率持续高于阈值",
"Group": "HIVE",
"TaskType": "HiveServer2JvmMemoryUsageMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "HiveServer2 JVM内存使用率",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "Impala Beeswax API客户端连接数高于阈值",
"Group": "IMPALA",
"TaskType": "ImpalaThriftServerBeeswaxFrontendConnMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "Impala Beeswax API客户端连接数",
"Value": "64",
"Editable": "true"
}
]
},
{
"Name": "Impala HS2客户端连接数高于阈值",
"Group": "IMPALA",
"TaskType": "ImpalaThriftServerHS2ConnMoreThanThrshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "Impala HS2客户端连接数",
"Value": "64",
"Editable": "true"
}
]
},
{
"Name": "JVM OLD区异常",
"Group": "集群",
"TaskType": "JVMOldException",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "单盘INODES使用率持续高于阈值",
"Group": "节点",
"TaskType": "SingleDiskInMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "单盘IO设备利用率持续高于阈值",
"Group": "节点",
"TaskType": "SingleDiskUtilMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "单盘空间使用率持续高于阈值",
"Group": "节点",
"TaskType": "SingleDiskSpaceMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "85",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "HBASE 两个HMaster服务状态均为Standby",
"Group": "HBASE",
"TaskType": "HmStandbyStatusMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "WindowSize",
"Name": "两个HMaster节点同时处于StandBy状态持续90秒以上,指标区间(秒)",
"Value": "300",
"Editable": "true"
}
]
},
{
"Name": "HDFS 两个NameNode服务状态均为Standby",
"Group": "HDFS",
"TaskType": "NNStandbyStatusMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "WindowSize",
"Name": "两个NameNode节点同时处于StandBy状态持续90秒以上,指标区间(秒)",
"Value": "300",
"Editable": "true"
}
]
},
{
"Name": "子机UTC时间和NTP时间差值高于阈值",
"Group": "节点",
"TaskType": "NodeUTCNTPTimeOffsetMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "30000",
"Editable": "true"
}
]
},
{
"Name": "HDFS NameNode进入安全模式",
"Group": "HDFS",
"TaskType": "HDFSNameNodeEnterSafeMode",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "HDFS MissingBlocks数量持续高于阈值",
"Group": "HDFS",
"TaskType": "HDFSMissingBlocksNumMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "阈值",
"Value": "1",
"Editable": "true"
},
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "1800",
"Editable": "true"
}
]
},
{
"Name": "节点故障",
"Group": "节点",
"TaskType": "NodeFailure",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "节点磁盘IO异常",
"Group": "节点",
"TaskType": "DiskIOError",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "服务角色健康状态异常",
"Group": "集群",
"TaskType": "ProcessDetectionAbnormal",
"Selected": "true",
"TaskSettings": [
{
"Key": "WindowSize",
"Name": "持续时间(秒)",
"Value": "300",
"Editable": "true"
}
]
},
{
"Name": "自动伸缩策略执行失败",
"Group": "集群",
"TaskType": "AutoScaleStrategyFailure",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "自动伸缩策略执行超时",
"Group": "集群",
"TaskType": "AutoScaleStrategyTimeOut",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "HMaster 发生主备切换",
"Group": "HBASE",
"TaskType": "HMasterSwitch",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "Zookeeper 发生Leader切换",
"Group": "ZOOKEEPER",
"TaskType": "ZKLeaderSwitch",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "YARN ResourceManager无active状态",
"Group": "YARN",
"TaskType": "YarnRmNoActiveStatusMoreThanThreshold",
"Selected": "true",
"TaskSettings": [
{
"Key": "WindowSize",
"Name": "Yarn无active状态的ResourceManager服务,持续时间(秒)",
"Value": "90",
"Editable": "true"
}
]
},
{
"Name": "进程被OOMKiller kill",
"Group": "集群",
"TaskType": "ProcessOutOfMemory",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "实例硬盘异常待授权",
"Group": "节点",
"TaskType": "InstanceDiskErrorInquiring",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "实例运行异常待授权",
"Group": "节点",
"TaskType": "InstanceRunningAbnormallyInquiring",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "子机nvme设备error",
"Group": "节点",
"TaskType": "NvmeError",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "机器重启",
"Group": "节点",
"TaskType": "GuestReboot",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "内存OOM",
"Group": "节点",
"TaskType": "GuestOom",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "内核故障",
"Group": "节点",
"TaskType": "GuestCoreError",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "磁盘只读",
"Group": "节点",
"TaskType": "CvmDiskReadonly",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "ping不可达",
"Group": "节点",
"TaskType": "PingUnreachable",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "开启外网环境下安全组端口存在风险",
"Group": "集群",
"TaskType": "NetworkSecurityHighRiskPortDetection",
"Selected": "true",
"TaskSettings": []
},
{
"Name": "HDFS目录满",
"Group": "HDFS",
"TaskType": "HdfsDirFull",
"Selected": "true",
"TaskSettings": [
{
"Key": "Threshold",
"Name": "百分比阈值",
"Value": "95",
"Editable": "true"
}
]
},
{
"Name": "Trino全表扫描分区表",
"Group": "TRINO",
"TaskType": "TrinoFullScanPartTable",
"Selected": "false",
"TaskSettings": []
}
]
}
输出示例
{
"Response": {
"Info": "OK",
"JobId": "499",
"RequestId": "c1ff0d96-48a7-47ef-bdde-ab6bf1fc5f15"
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: GitHub, Gitee
- Tencent Cloud SDK 3.0 for Java: GitHub, Gitee
- Tencent Cloud SDK 3.0 for PHP: GitHub, Gitee
- Tencent Cloud SDK 3.0 for Go: GitHub, Gitee
- Tencent Cloud SDK 3.0 for Node.js: GitHub, Gitee
- Tencent Cloud SDK 3.0 for .NET: GitHub, Gitee
- Tencent Cloud SDK 3.0 for C++: GitHub, Gitee
- Tencent Cloud SDK 3.0 for Ruby: GitHub, Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
InvalidParameter | 参数错误。 |