-
Notifications
You must be signed in to change notification settings - Fork 89
/
cloudwatch_agent.json
104 lines (102 loc) · 4.58 KB
/
cloudwatch_agent.json
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
{
"agent": {
"logfile": "/var/logs/amazon-cloudwatch-agent.log",
"region": "ap-southeast-1"
},
"logs": {
"logs_collected": {
"files": {
"collect_list": [
{
"file_path": "/opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/amazon-cloudwatch-agent.log"
},
{
"file_path": "/var/log/audit/audit.log",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/audit/audit.log"
},
{
"file_path": "/var/log/message",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/message"
},
{
"file_path": "/var/log/secure",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/secure"
},
{
"file_path": "/var/log/faillog",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/faillog"
},
{
"file_path": "/var/log/cron",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/cron"
},
{
"file_path": "/var/log/yum.log",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/yum.log"
},
{
"file_path": "/var/log/sudo.log",
"log_group_name": "/{{ agency_code }}/{{ project_code }}/{{ tags['Environment'] }}/{{ tags['Zone'] }}/logs/sudo.log"
}
]
}
}
},
"metrics": {
"aggregation_dimensions": [
[
"InstanceId"
]
],
"append_dimensions": {
"InstanceId": "${aws:InstanceId}"
},
"metrics_collected": {
"cpu": {
"measurement": [
"cpu_usage_idle",
"cpu_usage_iowait",
"cpu_usage_user",
"cpu_usage_system"
],
"metrics_collection_interval": 60,
"resources": [
"*"
],
"totalcpu": false
},
"disk": {
"measurement": [
"used_percent",
"inodes_free"
],
"metrics_collection_interval": 60,
"resources": [
"*"
]
},
"diskio": {
"measurement": [
"io_time"
],
"metrics_collection_interval": 60,
"resources": [
"*"
]
},
"mem": {
"measurement": [
"mem_used_percent"
],
"metrics_collection_interval": 60
},
"swap": {
"measurement": [
"swap_used_percent"
],
"metrics_collection_interval": 60
}
}
}
}