generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.yaml
151 lines (144 loc) · 4.5 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name : Terraform DigitalOcean Monitoring
# License of this project
license: "APACHE"
# Canonical GitHub repo
github_repo: terraform-do-modules/terraform-digitalocean-monitoring
# Badges to display
badges:
- name: "Latest Release"
image: "https://img.shields.io/github/release/terraform-do-modules/terraform-digitalocean-monitoring.svg"
url: "https://github.com/terraform-do-modules/terraform-digitalocean-monitoring/releases/latest"
- name: "tfsec"
image: "https://github.com/terraform-do-modules/terraform-digitalocean-monitoring/actions/workflows/tfsec.yml/badge.svg"
url: "https://github.com/terraform-do-modules/terraform-digitalocean-monitoring/actions/workflows/tfsec.yml"
- name: "Licence"
image: "https://img.shields.io/badge/License-APACHE-blue.svg"
url: "LICENSE.md"
prerequesties:
- name: Terraform 1.5.4
url: https://learn.hashicorp.com/terraform/getting-started/install.html
# description of this project
description: |-
Terraform module to create Digitalocean monitoring service resource on Digitalocean.
# extra content
include:
- "terraform.md"
# How to use this project
usage : |-
Here are examples of how you can use this module in your inventory structure:
### basic example
```hcl
module "uptime-alert" {
source = "terraform-do-modules/monitoring/digitalocean"
version = "1.0.0"
name = "app"
environment = "test"
target_url = ["http://test.do.clouddrove.ca/"]
type = ["http"]
alert_type = ["down_global"]
period = ["2m"]
comparison = ["less_than"]
####
notifications = [
{
email = ["example@gmail.com"]
slack = [
{
channel = "testing"
url = "https://hooks.slack.com/services/TEXXXXXXXXxxxxYTGH8DNkjgggyKipj"
}
]
}
]
}
```
### complete example
```hcl
module "uptime-alert" {
source = "terraform-do-modules/monitoring/digitalocean"
version = "1.0.0"
name = "app"
environment = "test"
target_url = ["http://test.do.clouddrove.ca/", "https://test2.do.clouddrove.ca/"]
type = ["http", "https"]
alert_type = ["down_global"]
period = ["2m", "3m"]
comparison = ["less_than"]
####
notifications = [
{
email = ["example@gmail.com"]
slack = [
{
channel = "testing"
url = "https://hooks.slack.com/services/TEXXXXXXXXxxxxYTGH8DNkjgggyKipj"
}
]
}
]
}
```
### resource alert
```hcl
module "resource-alert" {
source = "terraform-do-modules/monitoring/digitalocean"
version = "1.0.0"
name = "app"
environment = "test"
resource_alerts = {
"alert1" = {
alerts = [
{
email = ["example@gmail.com"]
slack = [
{
channel = "testing"
url = "https://hooks.slack.com/services/TEXXXXXXXXxxxxYTGH8DNkjgggyKipj"
}
]
}
]
window = "5m"
type = "v1/insights/droplet/cpu"
compare = "GreaterThan"
value = 95
enabled = true
entities = [module.droplet.id[0]]
description = "Alert about CPU usage"
tags = ["test"]
},
}
}
```
### uptime alert
```hcl
module "uptime-alert" {
source = "terraform-do-modules/monitoring/digitalocean"
version = "1.0.0"
name = "app"
environment = "test"
target_url = ["http://test.do.clouddrove.ca/", "https://test2.do.clouddrove.ca/"]
type = ["http", "https"]
alert_type = ["down_global"]
period = ["2m", "3m"]
comparison = ["less_than"]
####
notifications = [
{
email = ["example@gmail.com"]
slack = [
{
channel = "testing"
url = "https://hooks.slack.com/services/TEXXXXXXXXxxxxYTGH8DNkjgggyKipj"
}
]
}
]
}
```