tencent cloud

CreateExporterIntegration
Last updated: 2025-12-11 17:38:32
CreateExporterIntegration
Last updated: 2025-12-11 17:38:32

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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:.
  • 1 = TKE
  • 2 = EKS
  • 3 = MEKS
  • ClusterId No String Cluster ID, optional.

    3. Output Parameters

    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.

    4. Example

    Example1 Creating an EMR Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as emr-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. kind is the integration type, required and fixed as emr-exporter here
    3.2. spec.job is the scrape configuration, required in yaml format. For details, see the EMR integration documentation (https://www.tencentcloud.com/document/product/248/65343)

    Input Example

    POST / 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\"}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "emr-example-job"
            ],
            "RequestId": "xyz"
        }
    }

    Example2 Creating a Cdwch Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as cdwch-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. kind is the integration type, required and fixed as cdwch-exporter here
    3.2. spec.job is the scrape configuration, required in yaml format. It is recommended to refer to the reference input example and only modify the job_name and instance_ids.

    Input Example

    POST / 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\"}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "cdwch-example-job"
            ],
            "RequestId": "xyz"
        }
    }

    Example3 Creating a Scrape Job

    Install a no-auth agent to access the Prometheus native API over the private network without authentication.
    Once created, you can call the DescribeExporterIntegrations API to obtain the integrated private IP:Port address through the InstanceDesc parameter. This address can replace the Prometheus instance address to achieve authentication-free access.
    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as raw-job and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. kind is the integration type, required and fixed as raw-job here
    3.2. spec.job is the scrape configuration, required in yaml format. For details, see the documentation (https://www.tencentcloud.com/document/product/248/62393#native-job-configuration)

    Input Example

    POST / 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\"}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "test-job"
            ],
            "RequestId": "xyz"
        }
    }

    Example4 Creating a Kafka Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as kafka-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as kafka-exporter
    3.3. spec.instanceSpec.servers is the address of the Kafka instance, required. You can fill in more than one. We recommend one instance per integration.
    3.4. spec.instanceSpec.version is the Kafka instance version, which is optional. An error will be reported if not filled in for some versions, such as 0.10.2.0.
    3.5. spec.instanceSpec.labels is used to add custom tags to metrics, in key-value pair format, optional
    3.6. spec.exporterSpec.topicFilter is used for filtering topics. It is optional and collects all by default. After filling in a regular expression, only eligible topics are collected.
    3.7. spec.exporterSpec.groupFilter is used for filtering groups. It is optional and defaults to collecting all. After filling in regular expression, only eligible groups will be collected.

    Input Example

    POST / 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.*\"}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "kafka-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example5 Creating a MySQL Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as mysql-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as mysql-exporter
    3.3. spec.instanceSpec.user is the username of the MySQL instance, required.
    3.4. spec.instanceSpec.password is the password for the MySQL instance, required
    3.5. spec.instanceSpec.address is the connection address of the MySQL instance, required
    3.6. spec.instanceSpec.labels is used to add custom tags to metrics, with key-value pair type, optional

    Input Example

    POST / 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\"}}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "mysql-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example6 Creating a Redis Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as redis-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as redis-exporter
    3.3. spec.instanceSpec.address is the connection address of the Redis instance, required.
    3.4. spec.instanceSpec.password is the password for the Redis instance, required
    3.5. spec.instanceSpec.labels Used to add custom tags to metrics, key-value pair type, optional

    Input Example

    POST / 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\"}}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "redis-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example7 Creating a Consul Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as consul-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as consul-exporter
    3.3. spec.instanceSpec.server is the address of the Consul instance, required.
    3.4. spec.instanceSpec.labels Use custom tags for metrics, key-value pair type, optional

    Input Example

    POST / 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\"}}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "consul-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example8 Creating MongoDB Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as mongodb-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as mongodb-exporter
    3.3. spec.instanceSpec.user is the username of the MongoDB instance, required
    3.4. spec.instanceSpec.password is the password of the MongoDB instance, required
    3.5. spec.instanceSpec.servers is the connection address of the MongoDB instance, required, you can fill in more than one, separate with commas
    3.6. spec.instanceSpec.labels is used to add custom tags to metrics, with key-value pair type, optional
    3.7. spec.exporterSpec.collectors is the collection configuration of the exporter, fillable, an array of strings. This example shows you how to fill in all values. Among them, database 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, connpoolstats means enabling the collection of connection pool statistics.

    Input Example

    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\"]}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "mongodb-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example9 Creating a RocketMQ Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as rocketmq-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as rocketmq-exporter here
    3.3. spec.instanceSpec.address is the address of the RocketMQ instance, required. You can fill in more than one, separate them with a semicolon.
    3.4. spec.instanceSpec.version is the version of the RocketMQ instance, required, such as V4_9_4
    3.5. spec.instanceSpec.labels Used to add custom tags to metrics, key-value pair type, optional

    Input Example

    POST / 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\"}}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "rocketmq-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example10 Creating a Graphite Integration

    Installing the Graphite Exporter enables the conversion of Graphite metrics into Prometheus metrics.
    After creation, you can call the DescribeExporterIntegrations API to get the private IP address:Port of the integration through the InstanceDesc parameter.
    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as graphite-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as graphite-exporter
    3.3. spec.instanceSpec.isStrictMatch indicates whether to perform strict matching with mappingConfig. This field is optional and defaults to false.
    3.4. spec.instanceSpec.mappingConfig is the mapping configuration, which can define the name and label of Prometheus metrics. For details, see the official documentation (https://github.com/prometheus/graphite_exporter#yaml-config)

    Input Example

    POST / 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}\"}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "graphite-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example11 Creating Cloud Monitoring Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as qcloud-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as qcloud-exporter
    3.3. spec.instanceSpec.region indicates the region where the cloud product is located. This parameter is required. For example, to collect Cloud products in the Guangzhou region, you can set to Guangzhou or ap-guangzhou. The parameter will be converted to the label of the object, named instance-region.
    3.4. spec.instanceSpec.delaySeconds indicates data collection delay, an integer in seconds (optional, default is 0). When the value is 0, the timestamp of the original data point will be ignored and replaced with the time when the data point is pulled during integration. When the value is greater than 0, the data point will retain its original timestamp, and the data will inevitably be delayed by the set time.
    3.5. spec.instanceSpec.reload_interval_minutes indicates the instance refresh interval, an integer in minutes, required and must be greater than or equal to 10. New additions of cloud product instances or modifications to cloud tags will be reflected in metrics after instance refresh, with up to one instance refresh interval to wait.
    3.6. spec.instanceSpec.useRole indicates whether to use a service role. It is a boolean type and required. The current logic always uses a service role, so it must be set to true.
    3.7. spec.instanceSpec.labels is used to add custom tags to metrics, with key-value pair type, optional
    3.8. spec.exporterSpec.[Cloud Product] indicates whether to collect the corresponding cloud service. Boolean type, true means collecting this cloud service. Cloud service codes and their meanings: cvm: Cloud Virtual Machine, 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: MySQL Database (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 Connection, dcx: Direct Connect - Dedicated Tunnel, dcg: Direct Connect - Direct Connect Gateway, lighthouse: Tencent Cloud 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.
    3.9. spec.scrapeSpec.relabelConfigs is used to add the metric_relabel_configs configuration, which is optional. See the configuration example (https://www.tencentcloud.com/document/product/248/63002#29fe272b-ac9e-4932-b6dc-972c2b1ef9dc).

    Input Example

    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\"}},\"exporterSpec\":{\"cvm\":true,\"cbs\":true},\"scrapeSpec\":{\"relabelConfigs\":\"metric_relabel_configs:\\n- action: labeldrop\\n  regex: tmp_test_label\\n\"}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "test-qcloud"
            ],
            "RequestId": "xyz"
        }
    }

    Example12 Creating a Memcached Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as memcached-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as memcached-exporter
    3.3. spec.instanceSpec.address is the domain name or IP address of the Memcached instance, required.
    3.4. spec.instanceSpec.labels Use custom tags for metrics, key-value pair type, optional

    Input Example

    POST / 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\"}}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "memcached-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example13 Creating PostgreSQL Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as postgres-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as postgres-exporter
    3.3. spec.instanceSpec.user is the username of the PostgreSQL instance, required
    3.4. spec.instanceSpec.password is the password of the PostgreSQL instance, required
    3.5. spec.instanceSpec.address is the connection address of the PostgreSQL instance, required
    3.6. spec.instanceSpec.labels is used to add custom tags to metrics, with key-value pair type, optional

    Input Example

    POST / 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\"}}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "postgresql-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example14 Creating a Health Check Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as blackbox-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as blackbox-exporter
    3.3. spec.instanceSpec.module is the detection method, required. Optional values: http_get, http_post, tcp, ssh, ping.
    3.4. spec.instanceSpec.urls is the detection target, a string array, required. The target format can be host:port, http://abc, or https://abc.
    3.5. spec.instanceSpec.noAllowRedirect controls whether to forbid redirection. It is a boolean type, optional, and only applicable to the detection methods http_get and http_post. If true, it means redirection is forbidden. You can leave it blank, and it defaults to false.
    3.6. spec.instanceSpec.insecureSkipVerify controls whether to disable target certificate authentication. It is a boolean type and optional, only applicable to the detection methods http_get and http_post. true indicates that it is disabled. You can leave it blank, and it defaults to false.
    3.7. spec.instanceSpec.headers adds headers when probing the target. It uses key-value pairs, is optional, and only applicable to the http_get and http_post detection methods.
    3.8. spec.instanceSpec.labels is used to add custom tags to metrics, key-value pair type, optional
    3.9. spec.scrapeSpec.interval is used for custom check interval, optional, 15s is selected by default

    Input Example

    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\"}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "test-blackbox"
            ],
            "RequestId": "xyz"
        }
    }

    Example15 Creating an ElasticSearch Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as es-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as es-exporter here
    3.3. spec.instanceSpec.user is the username of ElasticSearch, required
    3.4. spec.instanceSpec.password is the ElasticSearch password, required
    3.5. spec.instanceSpec.url is the ElasticSearch connection address, required
    3.6. spec.instanceSpec.labels is used to add custom tags to metrics, with key-value pair type, optional
    3.7. spec.exporterSpec.all indicates whether to query statistical information of all nodes in a cluster. It is a boolean type, optional, and the default value is false. If false, it only queries statistical information of connected nodes.
    3.8. spec.exporterSpec.indices indicates whether to query index statistics for all in a cluster, boolean type, optional, default value is false
    3.9. spec.exporterSpec.indicesSettings indicates whether to query statistical information of all index configurations in a cluster, boolean type, optional, default value is false
    3.10. spec.exporterSpec.shards indicates whether to query index statistics of all in a cluster, including shard level statistical information. Boolean type, optional, default value is false.
    3.11. spec.exporterSpec.snapshots indicates whether to query cluster snapshot statistical information. It is a boolean type, optional, and the default value is false.
    3.12. spec.exporterSpec.clusterSettings indicates whether to query cluster configuration statistical information, boolean type, optional, default value is false

    Input Example

    POST / 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}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "es-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example16 Creating a No-Auth Proxy Integration

    Install a no-auth agent to access the Prometheus native API over the private network without authentication.
    Once created, you can call the DescribeExporterIntegrations API to obtain the integrated private IP:Port address through the InstanceDesc parameter. This address can replace the Prometheus instance address to achieve authentication-free access.
    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as auth-proxy and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. name is the integration name, required and globally unique, and must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    3.2. kind is the integration type, required and fixed as auth-proxy
    3.3. spec.instanceSpec.enableSelfMonitor indicates whether to collect self-monitoring metrics. This field is optional and the default is false. The self-monitoring metric is auth_proxy_http_requests_total{result=~"success|error"}, which counts request quantity for success or failure.

    Input Example

    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}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "auth-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example17 Creating a CVM Scrape Job Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as cvm-http-sd-exporter and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. kind is the integration type, required and fixed as cvm-http-sd-exporter
    3.2. spec.job is the scrape configuration, required in yaml format. For specific configuration, see the scraping configuration instructions (https://www.tencentcloud.com/document/product/248/62393#.60cvm_sd_config.60-configuration)

    Input Example

    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-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:example_tag_key\\n    values: \\n    - example_tag_value\\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\"}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "example-job-name"
            ],
            "RequestId": "xyz"
        }
    }

    Example18 Creating CVM Node Exporter Integration

    To ensure the CVM instance and Prometheus instance are connected via private network (for example, under the same VPC) and the CVM instance has Tencent Cloud Automation Tools (TAT) installed (https://www.tencentcloud.com/document/product/1147/46042).
    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as cvm-node-exporter-sd and is required.
    3. The parameter format of Content is as shown in the example. The details are as follows:
    3.1. kind is the integration type, required and fixed as cvm-node-exporter-sd here
    3.2. spec.job is the scrape configuration, required in yaml format. You can refer to the input example, where instance_ids can contain multiple CVM instance ids.

    Input Example

    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\"}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "node-test"
            ],
            "RequestId": "xyz"
        }
    }

    Example19 Creating Ingress NGINX Controller Integration

    The parameter descriptions are as follows:
    1. The InstanceId parameter is the Prometheus Instance ID and is required.
    2. The Kind parameter is fixed as nginx-ingress and is required.
    3. ClusterId is the cluster ID associated with the Prometheus instance where Ingress NGINX Controller is deployed, required
    4. KubeType is the cluster type corresponding to ClusterId, required. 1 means tke cluster, 2 or 3 means eks cluster.
    5. The parameter format of Content is as shown in the example. The details are as follows:
    5.1. kind is the integration type, required and fixed as nginx-ingress
    5.2. name is the integration name, required and globally unique, must match the regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
    5.3. spec.instanceSpec.namespace is the namespace where Ingress NGINX Controller resides, required
    5.4. spec.instanceSpec.name is the name of the Ingress NGINX Controller, required. Use the name of the Deployment or DaemonSet.
    5.5. spec.instanceSpec.workload is the cluster object type for Ingress NGINX Controller, required, such as deployment or daemonset.

    Input Example

    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\"}}}"
    }

    Output Example

    {
        "Response": {
            "Names": [
                "ingress-test"
            ],
            "RequestId": "xyz"
        }
    }

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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.
    Was this page helpful?
    You can also Contact Sales or Submit a Ticket for help.
    Yes
    No

    Feedback