@@ -4,43 +4,43 @@ Provides a resource to create a monitor tmpExporterIntegration
44
55Example Usage
66
7- Use blackbox -exporter
7+ Use qcloud -exporter
88
99``` hcl
10- resource "tencentcloud_monitor_tmp_exporter_integration" "tmpExporterIntegration " {
11- instance_id = "prom-dko9d0nu "
12- kind = "blackbox -exporter"
13- content = "{\"name\":\"test\",\"kind\":\"blackbox -exporter\",\"spec\":{\"instanceSpec\":{\"module \":\"http_get \",\"urls \":[\"xx\"]} }}"
14- kube_type = 1
15- cluster_id = "cls-bmuaukfu"
10+ resource "tencentcloud_monitor_tmp_exporter_integration" "example " {
11+ instance_id = "prom-gzg3f1em "
12+ kind = "qcloud -exporter"
13+ content = "{\"name\":\"test\",\"kind\":\"qcloud -exporter\",\"spec\":{\"scrapeSpec\":{\"interval\":\"1m\",\"timeout\":\"1m\",\"relabelConfigs\":\"#metricRelabelings:\\n#- action: labeldrop\\n# regex: tmp_test_label\\n\"},\" instanceSpec\":{\"region \":\"Guangzhou \",\"role \":\"CM_QCSLinkedRoleInTMP\",\"useRole\":true,\"authProvider\":{\"method\":1,\"presetRole\":\"CM_QCSLinkedRoleInTMP\"},\"rateLimit\":1000,\"delaySeconds\":0,\"rangeSeconds\":0,\"reload_interval_minutes\":10,\"uin\":\"100023201586\",\"tag_key_operation\":\"ToUnderLineAndLower\"},\"exporterSpec\":{\"cvm\":false,\"cbs\":true,\"imageRegistry\":\"ccr.ccs.tencentyun.com\",\"cpu\":\"0.25\",\"memory\":\"0.5Gi\"}},\"status\":{ }}"
14+ cluster_id = "cls-csxm4phu"
15+ kube_type = 3
1616}
1717```
1818
1919Use es-exporter
2020
2121```
22- resource "tencentcloud_monitor_tmp_exporter_integration" "tmpExporterIntegrationEs " {
23- instance_id = tencentcloud_monitor_tmp_instance.tmpInstance.id
22+ resource "tencentcloud_monitor_tmp_exporter_integration" "example " {
23+ instance_id = "prom-gzg3f1em"
2424 kind = "es-exporter"
2525 content = jsonencode({
26- "name": "ex-exporter-example",
27- "kind": "es-exporter",
28- "spec": {
29- "instanceSpec": {
30- "url": "http://127.0.0.1:9123",
31- "labels": {
32- "instance": "es-abcd"
33- },
34- "version": "1.70.1",
35- "user": "fugiat Duis minim",
36- "password": "exercitation cillum velit"
26+ "name" : "ex-exporter-example",
27+ "kind" : "es-exporter",
28+ "spec" : {
29+ "instanceSpec" : {
30+ "user" : "root",
31+ "password" : "Password@123"
32+ "url" : "http://127.0.0.1:8080",
33+ "labels" : {
34+ "labelKey" : "labelValue"
35+ }
3736 },
38- "exporterSpec": {
39- "all": true,
40- "indicesSettings": false,
41- "snapshots": false,
42- "indices": true,
43- "shards": false
37+ "exporterSpec" : {
38+ "all" : true,
39+ "indices" : true,
40+ "indicesSettings" : true,
41+ "shards" : true,
42+ "snapshots" : true,
43+ "clusterSettings" : true
4444 }
4545 }
4646 })
@@ -53,36 +53,36 @@ Integration Center: CVM Scrape Job
5353
5454```
5555resource "tencentcloud_vpc" "vpc" {
56- name = "tf-eks- vpc"
56+ name = "vpc"
5757 cidr_block = "10.2.0.0/16"
5858}
5959
60- resource "tencentcloud_subnet" "sub " {
60+ resource "tencentcloud_subnet" "subnet " {
6161 vpc_id = tencentcloud_vpc.vpc.id
62- name = "tf-as- subnet"
62+ name = "subnet"
6363 cidr_block = "10.2.11.0/24"
64- availability_zone = "ap-guangzhou-3 "
64+ availability_zone = "ap-guangzhou-6 "
6565}
6666
67- resource "tencentcloud_monitor_tmp_instance" "tmpInstance " {
68- instance_name = "tf-test-tmp "
67+ resource "tencentcloud_monitor_tmp_instance" "example " {
68+ instance_name = "tf-example "
6969 vpc_id = tencentcloud_vpc.vpc.id
70- subnet_id = tencentcloud_subnet.sub .id
70+ subnet_id = tencentcloud_subnet.subnet .id
7171 data_retention_time = 15
72- zone = "ap-guangzhou-3 "
72+ zone = "ap-guangzhou-6 "
7373 tags = {
74- " createdBy" = "terraform "
74+ createdBy = "Terraform "
7575 }
7676}
7777
7878# Integration Center: CVM Scrape Job
79- resource "tencentcloud_monitor_tmp_exporter_integration" "tmpExporterIntegration " {
80- instance_id = tencentcloud_monitor_tmp_instance.tmpInstance .id
79+ resource "tencentcloud_monitor_tmp_exporter_integration" "example " {
80+ instance_id = tencentcloud_monitor_tmp_instance.example .id
8181 kind = "cvm-http-sd-exporter"
82- content = jsonencode({
83- "kind": "cvm-http-sd-exporter",
84- "spec": {
85- "job": <<-EOT
82+ content = jsonencode({
83+ "kind" : "cvm-http-sd-exporter",
84+ "spec" : {
85+ "job" : <<-EOT
8686 job_name: example-cvm-job-name
8787 metrics_path: /metrics
8888 cvm_sd_configs:
@@ -106,7 +106,7 @@ resource "tencentcloud_monitor_tmp_exporter_integration" "tmpExporterIntegration
106106 EOT
107107 }
108108 })
109- kube_type = 3
110- cluster_id = ""
109+ cluster_id = ""
110+ kube_type = 3
111111}
112112```
0 commit comments