tccli 3.0.1084.1__py2.py3-none-any.whl → 3.0.1086.1__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/aiart/v20221229/QueryTextToImageProJob.md +30 -0
  3. tccli/examples/aiart/v20221229/SubmitTextToImageProJob.md +22 -0
  4. tccli/examples/billing/v20180709/DescribeCostDetail.md +36 -33
  5. tccli/examples/billing/v20180709/DescribeCostSummaryByProject.md +25 -80
  6. tccli/examples/billing/v20180709/DescribeCostSummaryByRegion.md +23 -14
  7. tccli/examples/billing/v20180709/DescribeCostSummaryByResource.md +53 -27
  8. tccli/examples/ccc/v20200210/CreateCompanyApply.md +36 -0
  9. tccli/examples/ccc/v20200210/DescribeCompanyList.md +33 -0
  10. tccli/examples/ccc/v20200210/ModifyCompanyApply.md +36 -0
  11. tccli/examples/ckafka/v20190819/CreateInstancePost.md +9 -6
  12. tccli/examples/ckafka/v20190819/CreatePrometheus.md +29 -0
  13. tccli/examples/ckafka/v20190819/DescribePrometheus.md +25 -0
  14. tccli/examples/cynosdb/v20190107/RollbackToNewCluster.md +62 -0
  15. tccli/examples/dlc/v20210125/QueryTaskCostDetail.md +20 -0
  16. tccli/examples/essbasic/v20210526/ChannelCreateReleaseFlow.md +1 -1
  17. tccli/examples/faceid/v20180301/GetFaceIdResult.md +4 -4
  18. tccli/examples/iotexplorer/v20190423/BindCloudStorageUser.md +22 -0
  19. tccli/examples/iotexplorer/v20190423/CreateIotVideoCloudStorage.md +22 -0
  20. tccli/examples/iotexplorer/v20190423/DeleteCloudStorageEvent.md +26 -0
  21. tccli/examples/iotexplorer/v20190423/DescribeCloudStorage.md +27 -0
  22. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageDate.md +24 -0
  23. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageEvents.md +87 -0
  24. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageMultiThumbnail.md +28 -0
  25. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageOrder.md +25 -0
  26. tccli/examples/iotexplorer/v20190423/DescribeCloudStoragePackageConsumeDetails.md +21 -0
  27. tccli/examples/iotexplorer/v20190423/DescribeCloudStoragePackageConsumeStats.md +44 -0
  28. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageStreamData.md +24 -0
  29. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageThumbnail.md +24 -0
  30. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageThumbnailList.md +28 -0
  31. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageTime.md +43 -0
  32. tccli/examples/iotexplorer/v20190423/DescribeCloudStorageUsers.md +29 -0
  33. tccli/examples/iotexplorer/v20190423/DescribeDevicePackages.md +37 -0
  34. tccli/examples/iotexplorer/v20190423/DescribePackageConsumeTask.md +21 -0
  35. tccli/examples/iotexplorer/v20190423/DescribePackageConsumeTasks.md +39 -0
  36. tccli/examples/iotexplorer/v20190423/GenerateSignedVideoURL.md +22 -0
  37. tccli/examples/iotexplorer/v20190423/InheritCloudStorageUser.md +23 -0
  38. tccli/examples/iotexplorer/v20190423/ResetCloudStorage.md +21 -0
  39. tccli/examples/iotexplorer/v20190423/ResetCloudStorageEvent.md +22 -0
  40. tccli/examples/iotexplorer/v20190423/TransferCloudStorage.md +22 -0
  41. tccli/examples/monitor/v20180724/CreateExporterIntegration.md +626 -2
  42. tccli/examples/ocr/v20181119/ReconstructDocument.md +2263 -0
  43. tccli/examples/pts/v20210728/CreateEnvironment.md +18 -0
  44. tccli/examples/pts/v20210728/DeleteEnvironments.md +18 -0
  45. tccli/examples/pts/v20210728/DescribeEnvironments.md +18 -0
  46. tccli/examples/pts/v20210728/UpdateEnvironment.md +18 -0
  47. tccli/examples/redis/v20180412/DescribeInstanceEvents.md +45 -0
  48. tccli/examples/redis/v20180412/ModifyInstanceEvent.md +25 -0
  49. tccli/examples/ssl/v20191205/UploadCertificate.md +48 -3
  50. tccli/examples/tag/v20180813/DescribeProjects.md +1 -1
  51. tccli/examples/tione/v20211111/CreateModelService.md +3 -1
  52. tccli/examples/tione/v20211111/ModifyModelService.md +62 -228
  53. tccli/examples/vrs/v20200824/DetectEnvAndSoundQuality.md +12 -4
  54. tccli/examples/wedata/v20210820/BatchCreateIntegrationTaskAlarms.md +11 -11
  55. tccli/examples/wedata/v20210820/BatchForceSuccessIntegrationTaskInstances.md +2 -2
  56. tccli/examples/wedata/v20210820/BatchKillIntegrationTaskInstances.md +2 -2
  57. tccli/examples/wedata/v20210820/BatchMakeUpIntegrationTasks.md +2 -2
  58. tccli/examples/wedata/v20210820/BatchRerunIntegrationTaskInstances.md +5 -2
  59. tccli/examples/wedata/v20210820/CheckDuplicateRuleName.md +5 -5
  60. tccli/examples/wedata/v20210820/CheckDuplicateTemplateName.md +4 -4
  61. tccli/examples/wedata/v20210820/CheckIntegrationNodeNameExists.md +4 -4
  62. tccli/examples/wedata/v20210820/CheckIntegrationTaskNameExists.md +4 -4
  63. tccli/examples/wedata/v20210820/CheckTaskNameExist.md +3 -3
  64. tccli/examples/wedata/v20210820/CommitExportTask.md +4 -4
  65. tccli/examples/wedata/v20210820/CreateInLongAgent.md +6 -6
  66. tccli/examples/wedata/v20210820/CreateOrUpdateResource.md +2 -1
  67. tccli/examples/wedata/v20210820/CreateRuleTemplate.md +1 -1
  68. tccli/examples/wedata/v20210820/CreateTaskAlarmRegular.md +11 -11
  69. tccli/examples/wedata/v20210820/DeleteInLongAgent.md +3 -3
  70. tccli/examples/wedata/v20210820/DeleteIntegrationNode.md +2 -2
  71. tccli/examples/wedata/v20210820/DeleteOfflineTask.md +4 -4
  72. tccli/examples/wedata/v20210820/DeleteRule.md +1 -1
  73. tccli/examples/wedata/v20210820/DeleteRuleTemplate.md +1 -1
  74. tccli/examples/wedata/v20210820/DescribeClusterNamespaceList.md +6 -6
  75. tccli/examples/wedata/v20210820/DescribeDataBases.md +12 -8
  76. tccli/examples/wedata/v20210820/DescribeDataCheckStat.md +5 -5
  77. tccli/examples/wedata/v20210820/DescribeDataObjects.md +6 -3
  78. tccli/examples/wedata/v20210820/DescribeExecStrategy.md +20 -16
  79. tccli/examples/wedata/v20210820/DescribeInLongAgentTaskList.md +6 -6
  80. tccli/examples/wedata/v20210820/DescribeInLongAgentVpcList.md +3 -3
  81. tccli/examples/wedata/v20210820/DescribeInstances.md +6 -6
  82. tccli/examples/wedata/v20210820/DescribeIntegrationNode.md +61 -43
  83. tccli/examples/wedata/v20210820/DescribeIntegrationStatistics.md +13 -13
  84. tccli/examples/wedata/v20210820/DescribeIntegrationStatisticsAgentStatus.md +6 -6
  85. tccli/examples/wedata/v20210820/DescribeIntegrationStatisticsInstanceTrend.md +8 -10
  86. tccli/examples/wedata/v20210820/DescribeIntegrationStatisticsRecordsTrend.md +1 -1
  87. tccli/examples/wedata/v20210820/DescribeIntegrationStatisticsTaskStatus.md +5 -5
  88. tccli/examples/wedata/v20210820/DescribeIntegrationStatisticsTaskStatusTrend.md +8 -10
  89. tccli/examples/wedata/v20210820/DescribeMonitorsByPage.md +7 -7
  90. tccli/examples/wedata/v20210820/DescribeOfflineTaskToken.md +3 -3
  91. tccli/examples/wedata/v20210820/DescribeProdTasks.md +6 -5
  92. tccli/examples/wedata/v20210820/DescribeRealTimeTaskInstanceNodeInfo.md +9 -9
  93. tccli/examples/wedata/v20210820/DescribeRealTimeTaskSpeed.md +32 -26
  94. tccli/examples/wedata/v20210820/DescribeRule.md +118 -23
  95. tccli/examples/wedata/v20210820/DescribeRuleDataSources.md +11 -8
  96. tccli/examples/wedata/v20210820/DescribeRuleDimStat.md +3 -3
  97. tccli/examples/wedata/v20210820/DescribeRuleExecDetail.md +48 -41
  98. tccli/examples/wedata/v20210820/DescribeRuleExecExportResult.md +15 -10
  99. tccli/examples/wedata/v20210820/DescribeRuleExecLog.md +2 -2
  100. tccli/examples/wedata/v20210820/DescribeRuleExecResults.md +72 -4
  101. tccli/examples/wedata/v20210820/DescribeRuleExecResultsByPage.md +38 -33
  102. tccli/examples/wedata/v20210820/DescribeRuleExecStat.md +14 -14
  103. tccli/examples/wedata/v20210820/DescribeRuleGroup.md +50 -23
  104. tccli/examples/wedata/v20210820/DescribeRuleGroupExecResultsByPage.md +87 -14
  105. tccli/examples/wedata/v20210820/DescribeRuleGroupExecResultsByPageWithoutAuth.md +81 -12
  106. tccli/examples/wedata/v20210820/DescribeRuleGroupSubscription.md +12 -6
  107. tccli/examples/wedata/v20210820/DescribeRuleGroupTable.md +35 -27
  108. tccli/examples/wedata/v20210820/DescribeRuleGroupsByPage.md +51 -21
  109. tccli/examples/wedata/v20210820/DescribeRuleHistoryByPage.md +9 -9
  110. tccli/examples/wedata/v20210820/DescribeRuleTablesByPage.md +52 -35
  111. tccli/examples/wedata/v20210820/DescribeRuleTemplate.md +33 -16
  112. tccli/examples/wedata/v20210820/DescribeRuleTemplates.md +8 -8
  113. tccli/examples/wedata/v20210820/DescribeRuleTemplatesByPage.md +13 -13
  114. tccli/examples/wedata/v20210820/DescribeRulesByPage.md +123 -28
  115. tccli/examples/wedata/v20210820/DescribeStandardRuleDetailInfoList.md +3 -3
  116. tccli/examples/wedata/v20210820/DescribeTableInfoList.md +9 -2
  117. tccli/examples/wedata/v20210820/DescribeTaskInstance.md +35 -35
  118. tccli/examples/wedata/v20210820/DescribeTaskInstanceReportDetail.md +28 -26
  119. tccli/examples/wedata/v20210820/DescribeTaskLockStatus.md +7 -7
  120. tccli/examples/wedata/v20210820/DescribeTaskReport.md +6 -6
  121. tccli/examples/wedata/v20210820/DescribeTaskReportDetailList.md +17 -17
  122. tccli/examples/wedata/v20210820/DescribeTopTableStat.md +9 -9
  123. tccli/examples/wedata/v20210820/DescribeTrendStat.md +2 -2
  124. tccli/examples/wedata/v20210820/DryRunDIOfflineTask.md +10 -9
  125. tccli/examples/wedata/v20210820/GetIntegrationNodeColumnSchema.md +13 -11
  126. tccli/examples/wedata/v20210820/GetOfflineDIInstanceList.md +26 -26
  127. tccli/examples/wedata/v20210820/LockIntegrationTask.md +4 -4
  128. tccli/examples/wedata/v20210820/ModifyIntegrationNode.md +42 -41
  129. tccli/examples/wedata/v20210820/ModifyIntegrationTask.md +110 -58
  130. tccli/examples/wedata/v20210820/ModifyMonitorStatus.md +4 -4
  131. tccli/examples/wedata/v20210820/ModifyRule.md +24 -24
  132. tccli/examples/wedata/v20210820/ModifyRuleGroupSubscription.md +11 -13
  133. tccli/examples/wedata/v20210820/ModifyTaskAlarmRegular.md +45 -16
  134. tccli/examples/wedata/v20210820/ModifyTaskName.md +5 -5
  135. tccli/examples/wedata/v20210820/RestartInLongAgent.md +3 -3
  136. tccli/examples/wedata/v20210820/RobAndLockIntegrationTask.md +7 -7
  137. tccli/examples/wedata/v20210820/StopIntegrationTask.md +4 -4
  138. tccli/examples/wedata/v20210820/TaskLog.md +5 -15
  139. tccli/examples/wedata/v20210820/UnlockIntegrationTask.md +4 -4
  140. tccli/examples/wedata/v20210820/UpdateInLongAgent.md +5 -5
  141. tccli/services/aiart/aiart_client.py +106 -0
  142. tccli/services/aiart/v20221229/api.json +174 -0
  143. tccli/services/aiart/v20221229/examples.json +16 -0
  144. tccli/services/asr/v20190614/api.json +4 -4
  145. tccli/services/bi/v20220105/api.json +27 -0
  146. tccli/services/billing/v20180709/api.json +365 -130
  147. tccli/services/billing/v20180709/examples.json +4 -4
  148. tccli/services/ccc/ccc_client.py +159 -0
  149. tccli/services/ccc/v20200210/api.json +442 -0
  150. tccli/services/ccc/v20200210/examples.json +24 -0
  151. tccli/services/cdb/v20170320/api.json +3 -3
  152. tccli/services/cdwch/v20200915/api.json +13 -4
  153. tccli/services/cdwdoris/v20211228/api.json +127 -0
  154. tccli/services/cdwpg/v20201230/api.json +9 -0
  155. tccli/services/ckafka/ckafka_client.py +106 -0
  156. tccli/services/ckafka/v20190819/api.json +190 -12
  157. tccli/services/ckafka/v20190819/examples.json +17 -1
  158. tccli/services/clb/v20180317/api.json +2 -2
  159. tccli/services/cloudstudio/v20230508/api.json +40 -4
  160. tccli/services/cls/v20201016/api.json +30 -30
  161. tccli/services/csip/v20221121/api.json +76 -76
  162. tccli/services/cwp/v20180228/api.json +124 -8
  163. tccli/services/cynosdb/cynosdb_client.py +53 -0
  164. tccli/services/cynosdb/v20190107/api.json +255 -0
  165. tccli/services/cynosdb/v20190107/examples.json +8 -0
  166. tccli/services/dlc/dlc_client.py +53 -0
  167. tccli/services/dlc/v20210125/api.json +103 -4
  168. tccli/services/dlc/v20210125/examples.json +8 -0
  169. tccli/services/dsgc/v20190723/api.json +20 -0
  170. tccli/services/dts/v20211206/api.json +56 -2
  171. tccli/services/es/v20180416/api.json +127 -24
  172. tccli/services/ess/v20201111/api.json +20 -20
  173. tccli/services/essbasic/v20210526/api.json +14 -5
  174. tccli/services/essbasic/v20210526/examples.json +1 -1
  175. tccli/services/faceid/v20180301/api.json +23 -13
  176. tccli/services/faceid/v20180301/examples.json +1 -1
  177. tccli/services/iotexplorer/iotexplorer_client.py +1453 -234
  178. tccli/services/iotexplorer/v20190423/api.json +2179 -117
  179. tccli/services/iotexplorer/v20190423/examples.json +184 -0
  180. tccli/services/lcic/v20220817/api.json +62 -4
  181. tccli/services/live/v20180801/api.json +16 -0
  182. tccli/services/monitor/v20180724/examples.json +111 -3
  183. tccli/services/mps/v20190612/api.json +161 -27
  184. tccli/services/ms/v20180408/api.json +14 -14
  185. tccli/services/ocr/ocr_client.py +53 -0
  186. tccli/services/ocr/v20181119/api.json +276 -0
  187. tccli/services/ocr/v20181119/examples.json +8 -0
  188. tccli/services/pts/pts_client.py +212 -0
  189. tccli/services/pts/v20210728/api.json +96 -0
  190. tccli/services/pts/v20210728/examples.json +32 -0
  191. tccli/services/redis/redis_client.py +106 -0
  192. tccli/services/redis/v20180412/api.json +342 -0
  193. tccli/services/redis/v20180412/examples.json +16 -0
  194. tccli/services/ssl/v20191205/examples.json +9 -3
  195. tccli/services/tag/v20180813/examples.json +1 -1
  196. tccli/services/tdmq/v20200217/api.json +45 -0
  197. tccli/services/tione/v20211111/api.json +77 -3
  198. tccli/services/tione/v20211111/examples.json +2 -2
  199. tccli/services/tms/v20201229/api.json +1 -1
  200. tccli/services/tmt/v20180321/api.json +1 -1
  201. tccli/services/trtc/v20190722/api.json +1 -1
  202. tccli/services/tse/v20201207/api.json +286 -42
  203. tccli/services/tts/v20190823/api.json +19 -10
  204. tccli/services/vod/v20180717/api.json +6 -6
  205. tccli/services/vrs/v20200824/api.json +34 -33
  206. tccli/services/vrs/v20200824/examples.json +1 -1
  207. tccli/services/wedata/v20210820/api.json +621 -198
  208. tccli/services/wedata/v20210820/examples.json +146 -146
  209. {tccli-3.0.1084.1.dist-info → tccli-3.0.1086.1.dist-info}/METADATA +2 -2
  210. {tccli-3.0.1084.1.dist-info → tccli-3.0.1086.1.dist-info}/RECORD +213 -174
  211. {tccli-3.0.1084.1.dist-info → tccli-3.0.1086.1.dist-info}/WHEEL +0 -0
  212. {tccli-3.0.1084.1.dist-info → tccli-3.0.1086.1.dist-info}/entry_points.txt +0 -0
  213. {tccli-3.0.1084.1.dist-info → tccli-3.0.1086.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,6 +1,116 @@
1
- **Example 1: 创建 blackbox-exporter 集成**
1
+ **Example 1: a. 创建 云监控 集成**
2
2
 
3
+ 参数说明:
4
+ 1. InstanceId 是 Prometheus 实例 ID,必填
5
+ 2. Kind 参数固定为 `qcloud-exporter`,必填
6
+ 3. Content 参数格式如示例。说明如下:
7
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
8
+ 3.2. kind 是集成类型,必填且这里固定为 `qcloud-exporter`
9
+ 3.3. spec.instanceSpec.region 是云产品所在地域,必填,比如采集广州地域的云产品,可以填 `广州` 或 `ap-guangzhou`,该参数最终会转化为指标的 label, 名为 `instance-region`
10
+ 3.4. spec.instanceSpec.delaySeconds 表示数据采集延迟,整数,单位是秒,可不填,默认是 0。当值为 0 时,原始数据点的时间戳会被忽略,替换为集成拉取到数据点的时间;当值 >0 时,数据点会保留原始的时间戳,且数据必然会延迟设置的时间
11
+ 3.5. spec.instanceSpec.reload_interval_minutes 表示实例刷新间隔,整数,单位是分钟,必填且必须大于等于 10。云产品实例的新增或者云标签的修改,会在刷新实例后反映在指标中,至多需要等待一个实例刷新间隔
12
+ 3.6. spec.instanceSpec.useRole 表示是否使用服务角色,布尔类型,必填。当前逻辑一定会使用服务角色,所以必填 `true`
13
+ 3.7. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
14
+ 3.8. spec.exporterSpec.[云产品] 表示是否采集对应云产品,布尔类型,`true` 表示采集该云产品。云产品各编码指代含义:`cvm`:云服务器,`cbs`:云硬盘,`lb_public`:负载均衡(公网),`lb_private`:负载均衡(内网),`tgw_set`:负载均衡(独占集群),`cmongo`:数据库MongoDB,`cdb`:数据库MySQL(CDB),`redis`:数据库Redis(CKV版),`redis_mem`:数据库Redis(内存版),`tendis`:Tendis,`xstor`:CTSDB(InfluxDB版),`mariadb`:数据库MariaDB,`postgres`:数据库PostgreSQL,`tdmysql`:TDSQL MySQL版,`cynosdb_mysql`:TDSQL-C MySQL,`sqlserver`:数据库SQL Server,`nat_gateway`:NAT网关,`ckafka`:CKafka,`rocketmq`:RocketMQ(新指标),`lb`:弹性公网IP,`vpngw`:VPN网关,`vpnx`:VPN通道,`vpc_net_detect`:网络探测,`cdn`:CDN,`ov_cdn`:CND(海外),`cos`:COS,`dc`:专线接入-物理专线,`dcx`:专线接入-专用通道,`dcg`:专线接入-专线网关,`lighthouse`:轻量应用服务器,`nacos`:Nacos,`zookeeper`:Zookeeper,`ces`:Elasticsearch,`dts`:数据传输服务,`vbc`:云联网,`gaap`:全球应用加速,`waf`:Web应用防火墙,`cfs`:文件存储,`bwp`:共享带宽包,`scf_v2`:云函数(别名),`vod`:云点播(VOD),`cls`:日志服务(CLS)-日志主题,`apigateway`:API 网关,`ti_traintask`:TI-ONE(任务式建模),`ti_notebook`:TI-ONE(Notebook),`ti_model`:TI-ONE(在线服务),`self`:采集器自监控
15
+ 2.9. spec.scrapeSpec.relabelConfigs 用于添加 `metricRelabelings` 配置,选填。该配置是 prometheus-operator 的 relabel 配置,部分字段与 prometheus 原生 relabel 配置不同,具体可参考[官方配置说明](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.RelabelConfig)
3
16
 
17
+ Input:
18
+
19
+ ```
20
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
21
+ --InstanceId prom-1 \
22
+ --Kind qcloud-exporter \
23
+ --Content {"name":"test","kind":"qcloud-exporter","spec":{"instanceSpec":{"region":"广州","delaySeconds":0,"reload_interval_minutes":10,"useRole":true,"labels":{"labelKey":"labelValue","test":"test"}},"exporterSpec":{"cvm":true,"cbs":true},"scrapeSpec":{"relabelConfigs":"metricRelabelings:\n- action: labeldrop\n regex: tmp_test_label\n"}}}
24
+ ```
25
+
26
+ Output:
27
+ ```
28
+ {
29
+ "Response": {
30
+ "Names": [
31
+ "test"
32
+ ],
33
+ "RequestId": "xyz"
34
+ }
35
+ }
36
+ ```
37
+
38
+ **Example 2: b. 创建 CVM Node Exporter 集成**
39
+
40
+ 该集成要保证 CVM 实例与 Prometheus 实例内网相通(比如同 VPC 下),且 CVM 实例安装了[自动化助手](https://cloud.tencent.com/document/product/1340/51945)。
41
+ 参数说明:
42
+ 1. InstanceId 是 Prometheus 实例 ID,必填
43
+ 2. Kind 参数固定为 `cvm-node-exporter-sd`,必填
44
+ 3. Content 参数格式如示例。说明如下:
45
+ 3.1. kind 是集成类型,必填且这里固定为 `cvm-node-exporter-sd
46
+ 3.2. spec.job 是抓取配置,必填,yaml格式,可参考输入示例,其中 instance_ids 可填写多个 CVM 实例 ID
47
+
48
+ Input:
49
+
50
+ ```
51
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
52
+ --InstanceId prom-1 \
53
+ --Kind cvm-node-exporter-sd \
54
+ --Content {"kind":"cvm-node-exporter-sd","spec":{"job":"job_name: node-test\ninstance:\n - region: ap-chengdu\n instance_ids:\n - ins-a\n - ins-b\n"}}
55
+ ```
56
+
57
+ Output:
58
+ ```
59
+ {
60
+ "Response": {
61
+ "Names": [
62
+ "node-test"
63
+ ],
64
+ "RequestId": "xyz"
65
+ }
66
+ }
67
+ ```
68
+
69
+ **Example 3: c. 创建 CVM 云服务器 集成**
70
+
71
+ 参数说明:
72
+ 1. InstanceId 是 Prometheus 实例 ID,必填
73
+ 2. Kind 参数固定为 `cvm-http-sd-exporter`,必填
74
+ 3. Content 参数格式如示例。说明如下:
75
+ 3.1. kind 是集成类型,必填且这里固定为 `cvm-http-sd-exporter`
76
+ 3.2. spec.job 是抓取配置,必填,yaml格式,具体配置可参考[抓取配置说明](https://cloud.tencent.com/document/product/1416/55995#%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%9C%8D%E5%8A%A1%E5%8F%91%E7%8E%B0%E9%85%8D%E7%BD%AE)
77
+
78
+ Input:
79
+
80
+ ```
81
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
82
+ --InstanceId prom-1 \
83
+ --Kind cvm-http-sd-exporter \
84
+ --Content {"kind":"cvm-http-sd-exporter","spec":{"job":"job_name: example-job-name\nmetrics_path: /metrics\ncvm_sd_configs:\n- region: ap-singapore\n ports:\n - 9100\n filters: \n - name: tag:示例标签键\n values: \n - 示例标签值\nrelabel_configs: \n- source_labels: [__meta_cvm_instance_state]\n regex: RUNNING\n action: keep\n- regex: __meta_cvm_tag_(.*)\n replacement: $1\n action: labelmap\n- source_labels: [__meta_cvm_region]\n target_label: region\n action: replace"}}
85
+ ```
86
+
87
+ Output:
88
+ ```
89
+ {
90
+ "Response": {
91
+ "Names": [
92
+ "example-job-name"
93
+ ],
94
+ "RequestId": "xyz"
95
+ }
96
+ }
97
+ ```
98
+
99
+ **Example 4: d. 创建 健康巡检 集成**
100
+
101
+ 参数说明:
102
+ 1. InstanceId 是 Prometheus 实例 ID,必填
103
+ 2. Kind 参数固定为 `blackbox-exporter`,必填
104
+ 3. Content 参数格式如示例。说明如下:
105
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
106
+ 3.2. kind 是集成类型,必填且这里固定为 `blackbox-exporter`
107
+ 3.3. spec.instanceSpec.module 是探测方式,必填,可选值为 `http_get`、`http_post`、`tcp`、`ssh`、`ping`
108
+ 3.4. spec.instanceSpec.urls 是探测目标,字符串数组,必填,目标格式可以是 host:port 或 http://abc 或 https://abc
109
+ 3.5. spec.instanceSpec.noAllowRedirect 可以控制是否禁止重定向,布尔类型,选填,仅对探测方式 `http_get` 和 `http_post` 生效,true 表示禁止重定向,可直接不填,默认为 false
110
+ 3.6. spec.instanceSpec.insecureSkipVerify 可以控制是否禁用目标证书验证,布尔类型,选填,仅对探测方式 `http_get` 和 `http_post` 生效,true 表示禁用目标证书验证,可直接不填,默认为 false
111
+ 3.7. spec.instanceSpec.headers 用于在探测目标时添加 header,键值对类型,选填,仅对探测方式 `http_get` 和 `http_post` 生效
112
+ 3.8. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
113
+ 3.9. spec.scrapeSpec.interval 用于自定义探测间隔,选填,默认是 15s
4
114
 
5
115
  Input:
6
116
 
@@ -8,7 +118,7 @@ Input:
8
118
  tccli monitor CreateExporterIntegration --cli-unfold-argument \
9
119
  --InstanceId prom-1 \
10
120
  --Kind blackbox-exporter \
11
- --Content {"name":"test","kind":"blackbox-exporter","spec":{"instanceSpec":{"module":"http_get","urls":["http://abc"]}}}
121
+ --Content {"name":"test","kind":"blackbox-exporter","spec":{"instanceSpec":{"module":"http_get","urls":["host:port","http://abc","https://abc"],"noAllowRedirect":false,"insecureSkipVerify":true,"headers":{"Authorization":"Basic <Credentials>","test":"test"},"labels":{"labelKey":"labelValue","test":"test"}},"scrapeSpec":{"interval":"15s"}}}
12
122
  ```
13
123
 
14
124
  Output:
@@ -23,3 +133,517 @@ Output:
23
133
  }
24
134
  ```
25
135
 
136
+ **Example 5: e. 创建 Ingress NGINX Controller 集成**
137
+
138
+ 采集关联集群中的 Ingress NGINX Controller。
139
+ 参数说明:
140
+ 1. InstanceId 是 Prometheus 实例 ID,必填
141
+ 2. Kind 参数固定为 `nginx-ingress`,必填
142
+ 3. ClusterId 是与 Prometheus 实例关联且部署了 Ingress NGINX Controller 的集群 ID,必填
143
+ 4. KubeType 是 ClusterId 对应的集群类型,必填。1 表示 tke 集群,2 或 3 表示 eks 集群
144
+ 5. Content 参数格式如示例。说明如下:
145
+ 5.1. kind 是集成类型,必填且这里固定为 `nginx-ingress`
146
+ 5.2. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
147
+ 5.3. spec.instanceSpec.namespace 是 Ingress NGINX Controller 所在的 namespace,必填
148
+ 5.4. spec.instanceSpec.name 是 Ingress NGINX Controller 的名字,必填。取 Deployment 或 DaemonSet 的名字
149
+ 5.5. spec.instanceSpec.workload 是 Ingress NGINX Controller 的集群对象类型,必填,比如 deployment 或者 daemonset
150
+
151
+ Input:
152
+
153
+ ```
154
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
155
+ --InstanceId prom-1 \
156
+ --ClusterId cls-test \
157
+ --KubeType 1 \
158
+ --Kind nginx-ingress \
159
+ --Content {"kind":"nginx-ingress","name":"ingress-test","spec":{"instanceSpec":{"namespace":"namespace","name":"controller-name","workLoad":"deployment"}}}
160
+ ```
161
+
162
+ Output:
163
+ ```
164
+ {
165
+ "Response": {
166
+ "Names": [
167
+ "ingress-test"
168
+ ],
169
+ "RequestId": "xyz"
170
+ }
171
+ }
172
+ ```
173
+
174
+ **Example 6: f. 创建 Cdwch 集成**
175
+
176
+ 参数说明:
177
+ 1. InstanceId 是 Prometheus 实例 ID,必填
178
+ 2. Kind 参数固定为 `cdwch-exporter`,必填
179
+ 3. Content 参数格式如示例。说明如下:
180
+ 3.1. kind 是集成类型,必填且这里固定为 `cdwch-exporter`
181
+ 3.2. spec.job 是抓取配置,必填,yaml格式,建议参考输入示例,仅需修改任务名和实例 ID
182
+
183
+ Input:
184
+
185
+ ```
186
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
187
+ --InstanceId prom-1 \
188
+ --Kind cdwch-exporter \
189
+ --Content {"kind":"cdwch-exporter","spec":{"job":"job_name: cdwch-example-job\nmetrics_path: /metrics\ncdwch_sd_configs:\n- region: ap-guangzhou\n instance_ids: \n - cdwch-test\nrelabel_configs:\n- regex: __meta_cdwch_(.*)\n replacement: $1\n action: labelmap"}}
190
+ ```
191
+
192
+ Output:
193
+ ```
194
+ {
195
+ "Response": {
196
+ "Names": [
197
+ "cdwch-example-job"
198
+ ],
199
+ "RequestId": "xyz"
200
+ }
201
+ }
202
+ ```
203
+
204
+ **Example 7: g. 创建 EMR 集成**
205
+
206
+ 参数说明:
207
+ 1. InstanceId 是 Prometheus 实例 ID,必填
208
+ 2. Kind 参数固定为 `emr-exporter`,必填
209
+ 3. Content 参数格式如示例。说明如下:
210
+ 4.1. kind 是集成类型,必填且这里固定为 `emr-exporter`
211
+ 4.2. spec.job 是抓取配置,必填,yaml格式,具体可参考[EMR 接入文档](https://cloud.tencent.com/document/product/1416/92850#cb099aba-2dd3-42e6-bc10-69db3999a5a8)
212
+
213
+ Input:
214
+
215
+ ```
216
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
217
+ --InstanceId prom-1 \
218
+ --Kind emr-exporter \
219
+ --Content {"kind":"emr-exporter","spec":{"job":"job_name: emr-example-job\nmetrics_path: /metrics\nemr_sd_configs:\n- region: ap-guangzhou\n instance_ids: \n - emr-test\nrelabel_configs:\n- regex: __meta_emr_(.*)\n replacement: $1\n action: labelmap"}}
220
+ ```
221
+
222
+ Output:
223
+ ```
224
+ {
225
+ "Response": {
226
+ "Names": [
227
+ "emr-example-job"
228
+ ],
229
+ "RequestId": "xyz"
230
+ }
231
+ }
232
+ ```
233
+
234
+ **Example 8: h. 创建 抓取任务**
235
+
236
+ 安装 免鉴权代理,可以免鉴权内网访问 Prometheus 原生 API。
237
+ 创建后可以调用 DescribeExporterIntegrations 接口,通过 InstanceDesc 参数获取集成的内网 IP:Port 地址,该地址可以代替 Prometheus 实例地址,实现免鉴权访问。
238
+ 参数说明:
239
+ 1. InstanceId 是 Prometheus 实例 ID,必填
240
+ 2. Kind 参数固定为 `raw-job`,必填
241
+ 3. Content 参数格式如示例。说明如下:
242
+ 3.1. kind 是集成类型,必填且这里固定为 `raw-job`
243
+ 3.2. spec.spec.job 是 Prometheus 原生抓取配置,yaml格式,必填。可参考[配置说明文档](https://cloud.tencent.com/document/product/1416/55995#.E5.8E.9F.E7.94.9F-job-.E9.85.8D.E7.BD.AE)
244
+
245
+ Input:
246
+
247
+ ```
248
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
249
+ --InstanceId prom-1 \
250
+ --Kind raw-job \
251
+ --Content {"kind":"raw-job","spec":{"job":"job_name: test\nscrape_interval: 30s\nstatic_configs:\n- targets:\n - 127.0.0.1:9090"}}
252
+ ```
253
+
254
+ Output:
255
+ ```
256
+ {
257
+ "Response": {
258
+ "Names": [
259
+ "test"
260
+ ],
261
+ "RequestId": "xyz"
262
+ }
263
+ }
264
+ ```
265
+
266
+ **Example 9: i. 创建 Consul 集成**
267
+
268
+ 安装 Consul Exporter。
269
+ 参数说明:
270
+ 1. InstanceId 是 Prometheus 实例 ID,必填
271
+ 2. Kind 参数固定为 `consul-exporter`,必填
272
+ 3. Content 参数格式如示例。说明如下:
273
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
274
+ 3.2. kind 是集成类型,必填且这里固定为 `consul-exporter`
275
+ 3.3. spec.instanceSpec.server 是 Consul 实例的地址,必填
276
+ 3.4. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
277
+
278
+ Input:
279
+
280
+ ```
281
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
282
+ --InstanceId prom-1 \
283
+ --Kind consul-exporter \
284
+ --Content {"name":"consul-test","kind":"consul-exporter","spec":{"instanceSpec":{"server":"1.1.1.1:8080","labels":{"labelKey":"labelValue","test":"test"}}}}
285
+ ```
286
+
287
+ Output:
288
+ ```
289
+ {
290
+ "Response": {
291
+ "Names": [
292
+ "consul-test"
293
+ ],
294
+ "RequestId": "xyz"
295
+ }
296
+ }
297
+ ```
298
+
299
+ **Example 10: j. 创建 ElasticSearch 集成**
300
+
301
+ 安装 ElasticSearch Exporter。
302
+ 参数说明:
303
+ 1. InstanceId 是 Prometheus 实例 ID,必填
304
+ 2. Kind 参数固定为 `es-exporter`,必填
305
+ 3. Content 参数格式如示例。说明如下:
306
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
307
+ 3.2. kind 是集成类型,必填且这里固定为 `es-exporter`
308
+ 3.3. spec.instanceSpec.user 是 ElasticSearch 的用户名称,必填
309
+ 3.4. spec.instanceSpec.password 是 ElasticSearch 的密码,必填
310
+ 3.5. spec.instanceSpec.url 是 ElasticSearch 的连接地址,必填
311
+ 3.6. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
312
+ 3.7. spec.exporterSpec.all 表示是否查询集群中所有节点的统计信息,布尔类型,选填,默认值为 false。false 则仅查询连接的节点的统计信息
313
+ 3.8. spec.exporterSpec.indices 表示是否查询集群中所有索引的统计信息,布尔类型,选填,默认值为 false
314
+ 3.9. spec.exporterSpec.indicesSettings 表示是否查询集群中所有索引配置的统计信息,布尔类型,选填,默认值为 false
315
+ 3.10. spec.exporterSpec.shards 表示是否查询集群中所有索引的统计信息,包括分片级别的统计信息,布尔类型,选填,默认值为 false。
316
+ 3.11. spec.exporterSpec.snapshots 表示是否查询集群快照的统计信息,布尔类型,选填,默认值为 false
317
+ 3.12. spec.exporterSpec.clusterSettings 表示是否查询集群配置的统计信息,布尔类型,选填,默认值为false
318
+
319
+ Input:
320
+
321
+ ```
322
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
323
+ --InstanceId prom-1 \
324
+ --Kind es-exporter \
325
+ --Content {"name":"es-test","kind":"es-exporter","spec":{"instanceSpec":{"user":"root","password":"password","url":"http://127.0.0.1:8080","labels":{"labelKey":"labelValue","test":"test"}},"exporterSpec":{"all":true,"indices":true,"indicesSettings":true,"shards":true,"snapshots":true,"clusterSettings":true}}}
326
+ ```
327
+
328
+ Output:
329
+ ```
330
+ {
331
+ "Response": {
332
+ "Names": [
333
+ "es-test"
334
+ ],
335
+ "RequestId": "xyz"
336
+ }
337
+ }
338
+ ```
339
+
340
+ **Example 11: k. 创建 Kafka 集成**
341
+
342
+ 安装 kafka Exporter。
343
+ 参数说明:
344
+ 1. InstanceId 是 Prometheus 实例 ID,必填
345
+ 2. Kind 参数固定为 `kafka-exporter`,必填
346
+ 3. Content 参数格式如示例。说明如下:
347
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
348
+ 3.2. kind 是集成类型,必填且这里固定为 `kafka-exporter`
349
+ 3.3. spec.instanceSpec.servers 是 Kafka 实例的地址,必填,可填写多个,建议一个实例一个集成
350
+ 3.4. spec.instanceSpec.version 是 Kafka 实例的版本,选填,部分版本不填写会报错,比如 0.10.2.0
351
+ 3.5. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
352
+ 3.6. spec.exporterSpec.topicFilter 用于过滤 topic,可不填,默认全部采集。填写正则表达式后,只采集符合条件的 topic
353
+ 3.7. spec.exporterSpec.groupFilter 用于过滤 group,可不填,默认全部采集。填写正则表达式后,只采集符合条件的 group
354
+
355
+ Input:
356
+
357
+ ```
358
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
359
+ --InstanceId prom-1 \
360
+ --Kind kafka-exporter \
361
+ --Content {"name":"kafka-test","kind":"kafka-exporter","spec":{"instanceSpec":{"servers":["127.0.0.1:8080"],"version":"0.10.2.0","labels":{"labelKey":"labelValue","test":"test"}},"exporterSpec":{"topicFilter":"topic.*","groupFilter":"group.*"}}}
362
+ ```
363
+
364
+ Output:
365
+ ```
366
+ {
367
+ "Response": {
368
+ "Names": [
369
+ "kafka-test"
370
+ ],
371
+ "RequestId": "xyz"
372
+ }
373
+ }
374
+ ```
375
+
376
+ **Example 12: l. 创建 RocketMQ 集成**
377
+
378
+ 安装 RocketMQ Exporter。
379
+ 参数说明:
380
+ 1. InstanceId 是 Prometheus 实例 ID,必填
381
+ 2. Kind 参数固定为 `rocketmq-exporter`,必填
382
+ 3. Content 参数格式如示例。说明如下:
383
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
384
+ 3.2. kind 是集成类型,必填且这里固定为 `rocketmq-exporter`
385
+ 3.3. spec.instanceSpec.address 是 RocketMQ 实例的地址,必填,可填写多个,用分号分割
386
+ 3.4. spec.instanceSpec.version 是 RocketMQ 实例的版本,必填,比如 V4_9_4
387
+ 3.5. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
388
+
389
+ Input:
390
+
391
+ ```
392
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
393
+ --InstanceId prom-1 \
394
+ --Kind rocketmq-exporter \
395
+ --Content {"name":"rocketmq-test","kind":"rocketmq-exporter","spec":{"instanceSpec":{"address":"127.0.0.1:8080;127.0.0.2:8080","version":"V4_9_4","labels":{"labelKey":"labelValue","test":"test"}}}}
396
+ ```
397
+
398
+ Output:
399
+ ```
400
+ {
401
+ "Response": {
402
+ "Names": [
403
+ "rocketmq-test"
404
+ ],
405
+ "RequestId": "xyz"
406
+ }
407
+ }
408
+ ```
409
+
410
+ **Example 13: m. 创建 Memcached 集成**
411
+
412
+ 安装 Memcached Exporter。
413
+ 参数说明:
414
+ 1. InstanceId 是 Prometheus 实例 ID,必填
415
+ 2. Kind 参数固定为 `memcached-exporter`,必填
416
+ 3. Content 参数格式如示例。说明如下:
417
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
418
+ 3.2. kind 是集成类型,必填且这里固定为 `memcached-exporter`
419
+ 3.3. spec.instanceSpec.address 是 Memcached 实例的地址,必填
420
+ 3.4. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
421
+
422
+ Input:
423
+
424
+ ```
425
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
426
+ --InstanceId prom-1 \
427
+ --Kind memcached-exporter \
428
+ --Content {"name":"memcached-test","kind":"memcached-exporter","spec":{"instanceSpec":{"address":"127.0.0.1:8080","labels":{"labelKey":"labelValue","test":"test"}}}}
429
+ ```
430
+
431
+ Output:
432
+ ```
433
+ {
434
+ "Response": {
435
+ "Names": [
436
+ "memcached-test"
437
+ ],
438
+ "RequestId": "xyz"
439
+ }
440
+ }
441
+ ```
442
+
443
+ **Example 14: n. 创建 MongoDB 集成**
444
+
445
+ 安装 MongoDB Exporter。
446
+ 参数说明:
447
+ 1. InstanceId 是 Prometheus 实例 ID,必填
448
+ 2. Kind 参数固定为 `mongodb-exporter`,必填
449
+ 3. Content 参数格式如示例。说明如下:
450
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
451
+ 3.2. kind 是集成类型,必填且这里固定为 `mongodb-exporter`
452
+ 3.3. spec.instanceSpec.user 是 MongoDB 实例的用户名称,必填
453
+ 3.4. spec.instanceSpec.password 是 MongoDB 实例的密码,必填
454
+ 3.5. spec.instanceSpec.servers 是 MongoDB 实例的连接地址,必填,可填写多个,逗号分隔
455
+ 3.6. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
456
+ 3.7. spec.exporterSpec.collectors 是 exporter 的采集配置,选填,字符串数组,示例中展示了所有可填写的值。其中`database` 表示启用数据库指标的采集,`collection`表示启用集合指标的采集,`topmetrics`表示启用数据库表头指标信息的采集,`indexusage`表示启用索引使用统计信息的采集,`connpoolstats`表示启用连接池统计信息的采集
457
+
458
+ Input:
459
+
460
+ ```
461
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
462
+ --InstanceId prom-1 \
463
+ --Kind mongodb-exporter \
464
+ --Content {"name":"mongodb-test","kind":"mongodb-exporter","spec":{"instanceSpec":{"user":"root","password":"password","servers":["127.0.0.1:8080","127.0.0.2:8080"],"labels":{"labelKey":"labelValue","test":"test"}},"exporterSpec":{"collectors":["database","collection","topmetrics","indexusage","connpoolstats"]}}}
465
+ ```
466
+
467
+ Output:
468
+ ```
469
+ {
470
+ "Response": {
471
+ "Names": [
472
+ "mongodb-test"
473
+ ],
474
+ "RequestId": "xyz"
475
+ }
476
+ }
477
+ ```
478
+
479
+ **Example 15: o. 创建 MySQL 集成**
480
+
481
+ 安装 MySQL Exporter。
482
+ 参数说明:
483
+ 1. InstanceId 是 Prometheus 实例 ID,必填
484
+ 2. Kind 参数固定为 `mysql-exporter`,必填
485
+ 3. Content 参数格式如示例。说明如下:
486
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
487
+ 3.2. kind 是集成类型,必填且这里固定为 `mysql-exporter`
488
+ 3.3. spec.instanceSpec.user 是 MySQL 实例的用户名称,必填
489
+ 3.4. spec.instanceSpec.password 是 MySQL 实例的密码,必填
490
+ 3.5. spec.instanceSpec.address 是 MySQL 实例的连接地址,必填
491
+ 3.6. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
492
+
493
+ Input:
494
+
495
+ ```
496
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
497
+ --InstanceId prom-1 \
498
+ --Kind mysql-exporter \
499
+ --Content {"name":"mysql-test","kind":"mysql-exporter","spec":{"instanceSpec":{"user":"root","password":"password","address":"127.0.0.1:8080","labels":{"labelKey":"labelValue","test":"test"}}}}
500
+ ```
501
+
502
+ Output:
503
+ ```
504
+ {
505
+ "Response": {
506
+ "Names": [
507
+ "mysql-test"
508
+ ],
509
+ "RequestId": "xyz"
510
+ }
511
+ }
512
+ ```
513
+
514
+ **Example 16: p. 创建 PostgreSQL 集成**
515
+
516
+ 安装 PostgreSQL Exporter。
517
+ 参数说明:
518
+ 1. InstanceId 是 Prometheus 实例 ID,必填
519
+ 2. Kind 参数固定为 `postgres-exporter`,必填
520
+ 3. Content 参数格式如示例。说明如下:
521
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
522
+ 3.2. kind 是集成类型,必填且这里固定为 `postgres-exporter`
523
+ 3.3. spec.instanceSpec.user 是 PostgreSQL 实例的用户名称,必填
524
+ 3.4. spec.instanceSpec.password 是 PostgreSQL 实例的密码,必填
525
+ 3.5. spec.instanceSpec.address 是 PostgreSQL 实例的连接地址,必填
526
+ 3.6. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
527
+
528
+ Input:
529
+
530
+ ```
531
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
532
+ --InstanceId prom-1 \
533
+ --Kind postgres-exporter \
534
+ --Content {"name":"postgresql-test","kind":"postgres-exporter","spec":{"instanceSpec":{"user":"user","password":"password","address":"127.0.0.1:8080","labels":{"labelKey":"labelValue","test":"test"}}}}
535
+ ```
536
+
537
+ Output:
538
+ ```
539
+ {
540
+ "Response": {
541
+ "Names": [
542
+ "postgresql-test"
543
+ ],
544
+ "RequestId": "xyz"
545
+ }
546
+ }
547
+ ```
548
+
549
+ **Example 17: q. 创建 Redis 集成**
550
+
551
+ 安装 Redis Exporter。
552
+ 参数说明:
553
+ 1. InstanceId 是 Prometheus 实例 ID,必填
554
+ 2. Kind 参数固定为 `redis-exporter`,必填
555
+ 3. Content 参数格式如示例。说明如下:
556
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
557
+ 3.2. kind 是集成类型,必填且这里固定为 `redis-exporter`
558
+ 3.3. spec.instanceSpec.address 是 Redis 实例的连接地址,必填
559
+ 3.4. spec.instanceSpec.password 是 Redis 实例的密码,必填
560
+ 3.5. spec.instanceSpec.labels 用于给指标添加自定义标签,键值对类型,选填
561
+
562
+ Input:
563
+
564
+ ```
565
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
566
+ --InstanceId prom-1 \
567
+ --Kind redis-exporter \
568
+ --Content {"name":"redis-test","kind":"redis-exporter","spec":{"instanceSpec":{"address":"127.0.0.1:8080","password":"password","labels":{"labelKey":"labelValue","test":"test"}}}}
569
+ ```
570
+
571
+ Output:
572
+ ```
573
+ {
574
+ "Response": {
575
+ "Names": [
576
+ "redis-test"
577
+ ],
578
+ "RequestId": "xyz"
579
+ }
580
+ }
581
+ ```
582
+
583
+ **Example 18: r. 创建 Graphite 集成**
584
+
585
+ 安装 Graphite Exporter,可以将 Graphite 指标转为 Prometheus 指标。
586
+ 创建后可以调用 DescribeExporterIntegrations 接口,通过 InstanceDesc 参数获取集成的内网 IP:Port 地址。
587
+ 参数说明:
588
+ 1. InstanceId 是 Prometheus 实例 ID,必填
589
+ 2. Kind 参数固定为 `graphite-exporter`,必填
590
+ 3. Content 参数格式如示例。说明如下:
591
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
592
+ 3.2. kind 是集成类型,必填且这里固定为 `graphite-exporter`
593
+ 3.3. spec.instanceSpec.isStrictMatch 表示是否严格匹配 mappingConfig,选填,默认是 false
594
+ 3.4. spec.instanceSpec.mappingConfig 是映射配置,可以定义 Prometheus 指标的名字和 label。具体可参考[官方文档](https://github.com/prometheus/graphite_exporter#yaml-config)
595
+
596
+ Input:
597
+
598
+ ```
599
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
600
+ --InstanceId prom-1 \
601
+ --Kind graphite-exporter \
602
+ --Content {"name":"graphite-test","kind":"graphite-exporter","spec":{"instanceSpec":{"isStrictMatch":true,"mappingConfig":"mappings:\n- match: test.dispatcher.*.*.*\n name: dispatcher_events_total\n labels:\n action: $2\n job: test_dispatcher\n outcome: $3\n processor: $1\n- match: \"*.signup.*.*\"\n name: signup_events_total\n labels:\n job: ${1}_server\n outcome: $3\n provider: $2\n- match: \"servers.(.*).networking.subnetworks.transmissions.([a-z0-9-]+).(.*)\"\n match_type: regex\n name: \"servers_networking_transmissions_${3}\"\n labels: \n hostname: ${1}\n device: ${2}"}}}
603
+ ```
604
+
605
+ Output:
606
+ ```
607
+ {
608
+ "Response": {
609
+ "Names": [
610
+ "graphite-test"
611
+ ],
612
+ "RequestId": "xyz"
613
+ }
614
+ }
615
+ ```
616
+
617
+ **Example 19: s. 创建 免鉴权代理 集成**
618
+
619
+ 安装 免鉴权代理,可以免鉴权内网访问 Prometheus 原生 API。
620
+ 创建后可以调用 DescribeExporterIntegrations 接口,通过 InstanceDesc 参数获取集成的内网 IP:Port 地址,该地址可以代替 Prometheus 实例地址,实现免鉴权访问。
621
+ 参数说明:
622
+ 1. InstanceId 是 Prometheus 实例 ID,必填
623
+ 2. Kind 参数固定为 `auth-proxy`,必填
624
+ 3. Content 参数格式如示例。说明如下:
625
+ 3.1. name 是集成名,必填且全局唯一,需要符合正则表达式`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
626
+ 3.2. kind 是集成类型,必填且这里固定为 `auth-proxy`
627
+ 3.3. spec.instanceSpec.enableSelfMonitor 表示是否采集自监控指标,选填,默认是 false。自监控指标是 auth_proxy_http_requests_total{result=~"success|error"},仅统计成功和失败的请求数量。
628
+
629
+ Input:
630
+
631
+ ```
632
+ tccli monitor CreateExporterIntegration --cli-unfold-argument \
633
+ --InstanceId prom-1 \
634
+ --Kind auth-proxy \
635
+ --Content {"name":"auth-test","kind":"auth-proxy","spec":{"instanceSpec":{"enableSelfMonitor":true}}}
636
+ ```
637
+
638
+ Output:
639
+ ```
640
+ {
641
+ "Response": {
642
+ "Names": [
643
+ "auth-test"
644
+ ],
645
+ "RequestId": "xyz"
646
+ }
647
+ }
648
+ ```
649
+