我使用AWS的最新Windows 2016 AMI - Windows_Server-2016-English-Full-Base-2017.01.11
分配给实例的IAM角色包含用于测试目的的AdministratorAccess策略。
我已将 AWS.EC2.Windows.CloudWatch.json 文件添加到 C:\ Program Files \ Amazon \ SSM \ Plugins \ awsCloudWatch 目录。< / p>
配置文件内容:
{
"schemaVersion": "1.2",
"description": "Example CloudWatch Logs tasks",
"runtimeConfig": {
"aws:cloudWatch": {
"settings": {
"startType": "Enabled"
},
"properties": {
"IsEnabled": true,
"EngineConfiguration": {
"PollInterval": "00:00:15",
"Components": [
{
"Id": "ApplicationEventLog",
"FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"LogName": "Application",
"Levels": "7"
}
},
{
"Id": "SecurityEventLog",
"FullName": "AWS.EC2.Windows.CloudWatch.EventLog.EventLogInputComponent,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"LogName": "Security",
"Levels": "7"
}
},
{
"Id": "MemoryCounter",
"FullName": "AWS.EC2.Windows.CloudWatch.PerformanceCounterComponent.PerformanceCounterInputComponent,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"CategoryName": "Memory",
"CounterName": "Available MBytes",
"InstanceName": "",
"MetricName": "Available Memory",
"Unit": "Megabytes",
"DimensionName": "instance_id",
"DimensionValue": "{instance_id}"
}
},
{
"Id": "CloudWatchLogs",
"FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"AccessKey": "",
"SecretKey": "",
"Region": "eu-west-1",
"LogGroup": "test-2016",
"LogStream": "{instance_id}"
}
},
{
"Id": "CloudWatch",
"FullName": "AWS.EC2.Windows.CloudWatch.CloudWatch.CloudWatchOutputComponent,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"AccessKey": "",
"SecretKey": "",
"Region": "eu-west-1",
"NameSpace": "Windows/Default"
}
}
],
"Flows": {
"Flows": [
"(ApplicationEventLog, SecurityEventLog),CloudWatchLogs",
"(MemoryCounter),CloudWatch"
]
}
}
}
}
}
}
它不起作用,CloudWatch Metrics和Logs都不可用。
任何想法如何解决?
提前致谢!