Domain name for API request: monitor.intl.tencentcloudapi.com.
Create an exporter integration in the integration center. Due to the considerable number of integrations, it is advisable to create through the console. Prerequisite: Authorized to create a managed EKS cluster. Verification method: 1. Confirm on the console interface. If no authorization notification appears, it indicates authorization is granted. 2. Query the cluster status via the DescribePrometheusInstanceInitStatus API. If the managed cluster does not exist, create it using the RunPrometheusInstance API.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateExporterIntegration. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-24. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo. |
| InstanceId | Yes | String | Instance ID |
| Kind | Yes | String | Type (obtain through the DescribePrometheusIntegrations api, using the ExporterType field of each item). |
| Content | Yes | String | Integrated configuration |
| KubeType | No | Integer | Kubernetes cluster type, optional, valid values are as follows:. |
| ClusterId | No | String | Cluster ID, optional. |
| Parameter Name | Type | Description |
|---|---|---|
| Names | Array of String | The list of successfully created integrations. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Parameter description:
qcloud-exporter and required.^a-z0-9?(.a-z0-9?)*$qcloud-exporterGuangzhou or ap-guangzhou. This parameter will be converted to the label of the object, named instance-region.true.true means collecting data from the cloud service. The meanings of cloud service codes are as follows: cvm: Cloud Virtual Machine, sdn_vm: Cloud Virtual Machine (private network), cbs: Cloud Block Storage, lb_public: Cloud Load Balancer (public network), lb_private: Cloud Load Balancer (private network), tgw_set: Cloud Load Balancer (exclusive cluster), cmongo: MongoDB Database, cdb: database MySQL (CDB), redis: Redis Database (CKV edition), redis_mem: Redis Database (in-memory edition), tendis: Tendis, xstor: CTSDB (InfluxDB edition), mariadb: MariaDB Database, postgres: PostgreSQL Database, tdmysql: TDSQL MySQL edition, cynosdb_mysql: TDSQL-C MySQL, sqlserver: SQL Server Database, nat_gateway: NAT Gateway, ckafka: CKafka, rocketmq: RocketMQ (new metric), lb: elastic IP, vpngw: VPN Gateway, vpnx: VPN Tunnel, vpc_net_detect: network probe, cdn: CDN, ov_cdn: CDN (overseas), cos: COS, dc: Direct Connect - physical dedicated line, dcx: Direct Connect - dedicated tunnel, dcg: Direct Connect - Direct Connect gateway, lighthouse: lighthouse, nacos: Nacos, zookeeper: Zookeeper, ces: Elasticsearch, dts: Data Transfer Service, vbc: Cloud Connect Network, gaap: Global Application Acceleration Platform, waf: Web Application Firewall, cfs: Cloud File Storage, bwp: Bandwidth Package, scf_v2: Serverless Cloud Function (alias), vod: Video on Demand (VOD), cls: Cloud Log Service (CLS) - log topic, apigateway: API Gateway, ti_traintask: TI-ONE (task-based modeling), ti_notebook: TI-ONE (Notebook), ti_model: TI-ONE (online service), self: collector self-monitoring. For more code meanings, please refer to the Cloud Monitoring Integration Guide.metric_relabel_configs configuration, which is optional. See the configuration example (https://www.tencentcloud.comom/document/product/248/87398?from_cn_redirect=1#29fe272b-ac9e-4932-b6dc-972c2b1ef9dc).POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "qcloud-exporter",
"Content": "{\"name\":\"test-qcloud\",\"kind\":\"qcloud-exporter\",\"spec\":{\"instanceSpec\":{\"region\":\"Guangzhou\",\"delaySeconds\":0,\"reload_interval_minutes\":10,\"useRole\":true,\"labels\":{\"labelKey\":\"labelValue\",\"test\":\"test\"},\"restart\":1770373080},\"exporterSpec\":{\"cvm\":true,\"cbs\":true},\"scrapeSpec\":{\"relabelConfigs\":\"metric_relabel_configs:\\n- action: labeldrop\\n regex: tmp_test_label\\n\"}}}"
}
{
"Response": {
"Names": [
"test-qcloud"
],
"RequestId": "xyz"
}
}
The integration requires the CVM instance and the Prometheus instance to be connected via the private network (for example, in the same VPC), and the CVM instance must have the tencent cloud Automation Tools (https://www.tencentcloud.comom/document/product/1340/51945?from_cn_redirect=1) installed.
Parameter description:
cvm-node-exporter-sd and is required.cvm-node-exporter-sd herespec.job is the scrape configuration, required, in yaml format. For reference input, see the example. Among them, instance_ids can fill in multiple CVM instance ids.POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "cvm-node-exporter-sd",
"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\"}}"
}
{
"Response": {
"Names": [
"node-test"
],
"RequestId": "xyz"
}
}
Parameter description:
cvm-http-sd-exporter and is required.cvm-http-sd-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "cvm-http-sd-exporter",
"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:ExampleTagKey\\n values: \\n - ExampleTagValue\\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\"}}"
}
{
"Response": {
"Names": [
"example-job-name"
],
"RequestId": "xyz"
}
}
Parameter description:
blackbox-exporter and required.^a-z0-9?(.a-z0-9?)*$blackbox-exporterhttp_get, http_post, tcp, ssh, ping.http_get and http_post. true means redirection is forbidden, and it can be left blank directly. It defaults to false.http_get and http_post detection methods. Setting it to true indicates that it is disabled. You can leave it blank as it defaults to false.http_get and http_post.POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "blackbox-exporter",
"Content": "{\"name\":\"test-blackbox\",\"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\"}}}"
}
{
"Response": {
"Names": [
"test-blackbox"
],
"RequestId": "xyz"
}
}
Collect Ingress NGINX Controller in the associated cluster.
Parameter description:
nginx-ingress and is required.nginx-ingress here^a-z0-9?(.a-z0-9?)*$POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"ClusterId": "cls-test",
"KubeType": 1,
"Kind": "nginx-ingress",
"Content": "{\"kind\":\"nginx-ingress\",\"name\":\"ingress-test\",\"spec\":{\"instanceSpec\":{\"namespace\":\"namespace\",\"name\":\"controller-name\",\"workLoad\":\"deployment\"}}}"
}
{
"Response": {
"Names": [
"ingress-test"
],
"RequestId": "xyz"
}
}
Parameter description:
cdwch-exporter and is required.cdwch-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "cdwch-exporter",
"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\"}}"
}
{
"Response": {
"Names": [
"cdwch-example-job"
],
"RequestId": "xyz"
}
}
Parameter description:
emr-exporter and required.emr-exporter herePOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "emr-exporter",
"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\"}}"
}
{
"Response": {
"Names": [
"emr-example-job"
],
"RequestId": "xyz"
}
}
Install a no-auth agent to access the native API of Prometheus over the private network without authentication.
Once created, you can call the DescribeExporterIntegrations API to get the integrated private IP address:Port through the InstanceDesc parameter. This address can replace the Prometheus instance address for authentication access.
Parameter description:
raw-job, requiredraw-job herePOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "raw-job",
"Content": "{\"kind\":\"raw-job\",\"spec\":{\"job\":\"job_name: test-job\\nscrape_interval: 30s\\nstatic_configs:\\n- targets:\\n - 127.0.0.1:9090\"}}"
}
{
"Response": {
"Names": [
"test-job"
],
"RequestId": "xyz"
}
}
Install Consul Exporter.
Parameter description:
consul-exporter and is required.^a-z0-9?(.a-z0-9?)*$consul-exporter herePOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "consul-exporter",
"Content": "{\"name\":\"consul-test\",\"kind\":\"consul-exporter\",\"spec\":{\"instanceSpec\":{\"server\":\"1.1.1.1:8080\",\"labels\":{\"labelKey\":\"labelValue\",\"test\":\"test\"}}}}"
}
{
"Response": {
"Names": [
"consul-test"
],
"RequestId": "xyz"
}
}
Install ElasticSearch Exporter.
Parameter description:
es-exporter and required.^a-z0-9?(.a-z0-9?)*$es-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "es-exporter",
"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}}}"
}
{
"Response": {
"Names": [
"es-test"
],
"RequestId": "xyz"
}
}
Install kafka Exporter.
Parameter description:
kafka-exporter and is required.^a-z0-9?(.a-z0-9?)*$kafka-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "kafka-exporter",
"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.*\"}}}"
}
{
"Response": {
"Names": [
"kafka-test"
],
"RequestId": "xyz"
}
}
Install RocketMQ Exporter.
Parameter description:
rocketmq-exporter and is required.^a-z0-9?(.a-z0-9?)*$rocketmq-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "rocketmq-exporter",
"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\"}}}}"
}
{
"Response": {
"Names": [
"rocketmq-test"
],
"RequestId": "xyz"
}
}
Install Memcached Exporter.
Parameter description:
memcached-exporter and is required.^a-z0-9?(.a-z0-9?)*$memcached-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "memcached-exporter",
"Content": "{\"name\":\"memcached-test\",\"kind\":\"memcached-exporter\",\"spec\":{\"instanceSpec\":{\"address\":\"127.0.0.1:8080\",\"labels\":{\"labelKey\":\"labelValue\",\"test\":\"test\"}}}}"
}
{
"Response": {
"Names": [
"memcached-test"
],
"RequestId": "xyz"
}
}
Install MongoDB Exporter.
Parameter description:
mongodb-exporter and required.^a-z0-9?(.a-z0-9?)*$mongodb-exporterdatabase means enabling the collection of database metrics, collection means enabling the collection of collection metrics, topmetrics means enabling the collection of header metric information, indexusage means enabling the collection of index usage statistics, and connpoolstats means enabling the collection of connection pool statistics.POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "mongodb-exporter",
"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\"]}}}"
}
{
"Response": {
"Names": [
"mongodb-test"
],
"RequestId": "xyz"
}
}
Install MySQL Exporter.
Parameter description:
mysql-exporter and is required.^a-z0-9?(.a-z0-9?)*$mysql-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "mysql-exporter",
"Content": "{\"name\":\"mysql-test\",\"kind\":\"mysql-exporter\",\"spec\":{\"instanceSpec\":{\"user\":\"root\",\"password\":\"password\",\"address\":\"127.0.0.1:8080\",\"labels\":{\"labelKey\":\"labelValue\",\"test\":\"test\"}}}}"
}
{
"Response": {
"Names": [
"mysql-test"
],
"RequestId": "xyz"
}
}
Install PostgreSQL Exporter.
Parameter description:
postgres-exporter and is required.^a-z0-9?(.a-z0-9?)*$postgres-exporter herePOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "postgres-exporter",
"Content": "{\"name\":\"postgresql-test\",\"kind\":\"postgres-exporter\",\"spec\":{\"instanceSpec\":{\"user\":\"user\",\"password\":\"password\",\"address\":\"127.0.0.1:8080\",\"labels\":{\"labelKey\":\"labelValue\",\"test\":\"test\"}}}}"
}
{
"Response": {
"Names": [
"postgresql-test"
],
"RequestId": "xyz"
}
}
Install Redis Exporter.
Parameter description:
redis-exporter and is required.^a-z0-9?(.a-z0-9?)*$redis-exporterPOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "redis-exporter",
"Content": "{\"name\":\"redis-test\",\"kind\":\"redis-exporter\",\"spec\":{\"instanceSpec\":{\"address\":\"127.0.0.1:8080\",\"password\":\"password\",\"labels\":{\"labelKey\":\"labelValue\",\"test\":\"test\"}}}}"
}
{
"Response": {
"Names": [
"redis-test"
],
"RequestId": "xyz"
}
}
Install Graphite Exporter to convert Graphite metrics to Prometheus Metrics.
Once created, you can call the DescribeExporterIntegrations API to obtain the integrated private IP address:Port host address through the InstanceDesc parameter.
Parameter description:
graphite-exporter and is required.^a-z0-9?(.a-z0-9?)*$graphite-exporter herePOST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "graphite-exporter",
"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}\"}}}"
}
{
"Response": {
"Names": [
"graphite-test"
],
"RequestId": "xyz"
}
}
Install a no-auth agent to access the native API of Prometheus over the private network without authentication.
Once created, you can call the DescribeExporterIntegrations API to get the integrated private IP address:Port through the InstanceDesc parameter. This address can replace the Prometheus instance address for authentication access.
Parameter description:
auth-proxy and is required.^a-z0-9?(.a-z0-9?)*$auth-proxy here.POST / HTTP/1.1
Host: monitor.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateExporterIntegration
<Common request parameters>
{
"InstanceId": "prom-1",
"Kind": "auth-proxy",
"Content": "{\"name\":\"auth-test\",\"kind\":\"auth-proxy\",\"spec\":{\"instanceSpec\":{\"enableSelfMonitor\":true}}}"
}
{
"Response": {
"Names": [
"auth-test"
],
"RequestId": "xyz"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure | Error with CAM signature/authentication. |
| AuthFailure.UnauthorizedOperation | The request is not authorized. For more information on the authentication, see the CAM documentation. |
| FailedOperation | Operation failed. |
| FailedOperation.AccessTKEFail | Failed to access the TKE cluster. |
| FailedOperation.ClusterNotFound | The cluster does not exist. |
| FailedOperation.DbQueryFailed | Failed to query the database. |
| FailedOperation.InstanceNotRunning | The instance is not running. |
| FailedOperation.ResourceExist | The resource already exists. |
| FailedOperation.ResourceNotFound | The resource does not exist. |
| FailedOperation.ResourceOperating | The resource is being manipulated. |
| FailedOperation.TKEResourceConflict | A conflict occurred while updating the TKE resource. |
| InternalError | Internal error. |
| InvalidParameter | Invalid parameter. |
Feedback