-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.yaml
122 lines (109 loc) · 3.45 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name : Terraform AZURE MONITOR ALERTS
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: clouddrove/terraform-azure-monitor-alerts
# Badges to display
badges:
- name: "Terraform"
image: "https://img.shields.io/badge/Terraform-v1.1.7-green"
url: "https://www.terraform.io"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
# description of this project
description: |-
Terraform module to create monitor alerts resource on AZURE.
# extra content
include:
- "terraform.md"
# How to use this project
usage: |-
Here are some examples of how you can use this module in your inventory structure:
### action group
```hcl
module "monitor-alerts" {
source = "clouddrove/monitor-alerts/azure"
version = "1.0.0"
name = "app"
environment = "test"
label_order = ["name", "environment"]
actionGroups = {
"group1" = {
actionGroupName = "AlertEscalationGroup"
actionGroupShortName = "alertesc"
actionGroupRGName = module.resource_group.resource_group_name
actionGroupEnabled = "true"
actionGroupEmailReceiver = [
{
name = "example"
email_address = "[email protected]"
use_common_alert_schema = "true"
},
{
name = "test"
email_address = "[email protected]"
use_common_alert_schema = "true"
}
]
}
}
}
```
### metric alert
```hcl
module "monitor-alerts" {
source = "clouddrove/monitor-alerts/azure"
version = "1.0.0"
name = "app"
environment = "test"
label_order = ["name", "environment"]
actionGroups = {
"group1" = {
actionGroupName = "AlertEscalationGroup"
actionGroupShortName = "alertesc"
actionGroupRGName = module.resource_group.resource_group_name
actionGroupEnabled = "true"
actionGroupEmailReceiver = [
{
name = "test"
email_address = "[email protected]"
use_common_alert_schema = "true"
},
{
name = "test"
email_address = "[email protected]"
use_common_alert_schema = "true"
}
]
}
}
}
```
### Activity Log Alert
```hcl
module "alerts" {
depends_on = [data.azurerm_monitor_action_group.example, ]
source = "clouddrove/monitor-alerts/azure"
name = "app"
environment = "test"
label_order = ["name", "environment"]
activity_log_alert = {
"test1" = {
alertname = "nsg-write"
alertrg = module.resource_group.resource_group_name
alertscopes = [module.resource_group.resource_group_id]
description = "Administrative alerts for nsg"
operation_name = "Microsoft.Network/networkSecurityGroups/write"
actionGroupID = data.azurerm_monitor_action_group.example.id
category = "Administrative"
}
}
}
```