@@ -4,43 +4,43 @@ Provides a resource to create a monitor tmpExporterIntegration
4
4
5
5
Example Usage
6
6
7
- Use blackbox -exporter
7
+ Use qcloud -exporter
8
8
9
9
``` 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
16
16
}
17
17
```
18
18
19
19
Use es-exporter
20
20
21
21
```
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"
24
24
kind = "es-exporter"
25
25
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
+ }
37
36
},
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
44
44
}
45
45
}
46
46
})
@@ -53,36 +53,36 @@ Integration Center: CVM Scrape Job
53
53
54
54
```
55
55
resource "tencentcloud_vpc" "vpc" {
56
- name = "tf-eks- vpc"
56
+ name = "vpc"
57
57
cidr_block = "10.2.0.0/16"
58
58
}
59
59
60
- resource "tencentcloud_subnet" "sub " {
60
+ resource "tencentcloud_subnet" "subnet " {
61
61
vpc_id = tencentcloud_vpc.vpc.id
62
- name = "tf-as- subnet"
62
+ name = "subnet"
63
63
cidr_block = "10.2.11.0/24"
64
- availability_zone = "ap-guangzhou-3 "
64
+ availability_zone = "ap-guangzhou-6 "
65
65
}
66
66
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 "
69
69
vpc_id = tencentcloud_vpc.vpc.id
70
- subnet_id = tencentcloud_subnet.sub .id
70
+ subnet_id = tencentcloud_subnet.subnet .id
71
71
data_retention_time = 15
72
- zone = "ap-guangzhou-3 "
72
+ zone = "ap-guangzhou-6 "
73
73
tags = {
74
- " createdBy" = "terraform "
74
+ createdBy = "Terraform "
75
75
}
76
76
}
77
77
78
78
# 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
81
81
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
86
86
job_name: example-cvm-job-name
87
87
metrics_path: /metrics
88
88
cvm_sd_configs:
@@ -106,7 +106,7 @@ resource "tencentcloud_monitor_tmp_exporter_integration" "tmpExporterIntegration
106
106
EOT
107
107
}
108
108
})
109
- kube_type = 3
110
- cluster_id = ""
109
+ cluster_id = ""
110
+ kube_type = 3
111
111
}
112
112
```
0 commit comments