Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions tencentcloud/resource_tc_monitor_tmp_tke_alert_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,26 @@ Example Usage

```hcl

resource "tencentcloud_monitor_tmp_tke_alert_policy" "tmpAlertPolicy" {
instance_id = "xxxxx"
resource "tencentcloud_monitor_tmp_tke_alert_policy" "basic" {
instance_id = "prom-xxxxxx"
alert_rule {
name = "xxx"
name = "alert_rule-test"
rules {
name = "xx"
rule = "xx"
template = "xx"
for = "xx"
name = "rules-test"
rule = "(count(kube_node_status_allocatable_cpu_cores) by (cluster) -1) / count(kube_node_status_allocatable_cpu_cores) by (cluster)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文就不要写了

template = "The CPU requested by the Pod in the cluster {{ $labels.cluster }} is overloaded, and the current CPU application ratio is {{ $value | humanizePercentage }}"
for = "5m"
labels {
name = "xx"
value = "xx"
}
annotations {
name = "xx"
value = "xx"
name = "severity"
value = "warning"
}
}
notification {
type = "xx"
type = "amp"
enabled = true
alert_manager {
url = "xx"
cluster_id = "xx"
cluster_type = "xx"
}
url = "xxx"
}
}
}
}
Expand Down
44 changes: 22 additions & 22 deletions tencentcloud/resource_tc_monitor_tmp_tke_global_notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ Provides a resource to create a tmp tke global notification
Example Usage

```hcl
resource "tencentcloud_monitor_tmp_tke_global_notification" "tmpGlobalNotification" {
instance_id = xxx
notification{
enabled = true
type = "webhook"
web_hook = ""
alert_manager {
url = ""
cluster_type = ""
cluster_id = ""
}
repeat_interval = ""
time_range_start = ""
time_range_end = ""
notify_way = ["SMS", "EMAIL"]
receiver_groups = [""]
phone_notify_order = []
phone_circle_times = xxx
phone_inner_interval = xxx
phone_circle_interval = xxx
phone_arrive_notice = false
}
resource "tencentcloud_monitor_tmp_tke_global_notification" "basic" {
instance_id = "prom-xxxxxx"
notification {
enabled = true
type = "webhook"
alert_manager {
cluster_id = ""
cluster_type = ""
url = ""
}
web_hook = ""
repeat_interval = "5m"
time_range_start = "00:00:00"
time_range_end = "23:59:59"
notify_way = ["SMS", "EMAIL"]
receiver_groups = []
phone_notify_order = []
phone_circle_times = 0
phone_inner_interval = 0
phone_circle_interval = 0
phone_arrive_notice = false
}
}
```
*/
Expand Down
28 changes: 11 additions & 17 deletions website/docs/r/monitor_tmp_tke_alert_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,25 @@ Provides a resource to create a tke tmpAlertPolicy
## Example Usage

```hcl
resource "tencentcloud_monitor_tmp_tke_alert_policy" "tmpAlertPolicy" {
instance_id = "xxxxx"
resource "tencentcloud_monitor_tmp_tke_alert_policy" "basic" {
instance_id = "prom-xxxxxx"
alert_rule {
name = "xxx"
name = "alert_rule-test"
rules {
name = "xx"
rule = "xx"
template = "xx"
for = "xx"
name = "rules-test"
rule = "(count(kube_node_status_allocatable_cpu_cores) by (cluster) -1) / count(kube_node_status_allocatable_cpu_cores) by (cluster)"
template = "The CPU requested by the Pod in the cluster {{ $labels.cluster }} is overloaded, and the current CPU application ratio is {{ $value | humanizePercentage }}"
for = "5m"
labels {
name = "xx"
value = "xx"
}
annotations {
name = "xx"
value = "xx"
name = "severity"
value = "warning"
}
}
notification {
type = "xx"
type = "amp"
enabled = true
alert_manager {
url = "xx"
cluster_id = "xx"
cluster_type = "xx"
url = "xxx"
}
}
}
Expand Down
28 changes: 14 additions & 14 deletions website/docs/r/monitor_tmp_tke_global_notification.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ Provides a resource to create a tmp tke global notification
## Example Usage

```hcl
resource "tencentcloud_monitor_tmp_tke_global_notification" "tmpGlobalNotification" {
instance_id = xxx
resource "tencentcloud_monitor_tmp_tke_global_notification" "basic" {
instance_id = "prom-xxxxxx"
notification {
enabled = true
type = "webhook"
web_hook = ""
enabled = true
type = "webhook"
alert_manager {
url = ""
cluster_type = ""
cluster_id = ""
cluster_type = ""
url = ""
}
repeat_interval = ""
time_range_start = ""
time_range_end = ""
web_hook = ""
repeat_interval = "5m"
time_range_start = "00:00:00"
time_range_end = "23:59:59"
notify_way = ["SMS", "EMAIL"]
receiver_groups = [""]
receiver_groups = []
phone_notify_order = []
phone_circle_times = xxx
phone_inner_interval = xxx
phone_circle_interval = xxx
phone_circle_times = 0
phone_inner_interval = 0
phone_circle_interval = 0
phone_arrive_notice = false
}
}
Expand Down