-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.tf
More file actions
81 lines (69 loc) 路 1.74 KB
/
Copy pathmain.tf
File metadata and controls
81 lines (69 loc) 路 1.74 KB
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
provider "aws" {
region = "us-east-1"
}
###################################################
# Log Group for CloudWatch Logs
###################################################
module "log_group" {
source = "../../modules/cloudwatch-log-group"
# source = "tedilabs/observability/aws//modules/cloudwatch-log-group"
# version = "~> 0.2.0"
name = "/tedilabs/test"
skip_destroy = false
retention_in_days = 7
encryption_kms_key = null
streams = [
"test-stream-1",
"test-stream-2",
]
metric_filters = [
{
name = "event-count"
metric = {
namespace = "Custom/Example"
name = "EventCount"
value = "1"
default_value = "0"
unit = "None"
}
},
{
name = "error-count"
pattern = "Error"
metric = {
namespace = "Custom/Example"
name = "ErrorCount"
value = "1"
default_value = "0"
unit = "None"
}
},
{
name = "apache-404-count"
pattern = "[ip, id, user, timestamp, request, status_code=404, size]"
metric = {
namespace = "Custom/Example"
name = "ApacheNotFoundErrorCount"
value = "1"
default_value = "0"
unit = "None"
}
},
{
name = "apache-bytes-transferred"
pattern = "[ip, id, user, timestamp, request, status_code, size]"
metric = {
namespace = "Custom/Example"
name = "ApacheBytesTransferred"
value = "$size"
unit = "Bytes"
dimensions = {
"IP" = "$ip"
}
}
},
]
tags = {
"project" = "terraform-aws-observability-examples"
}
}