我正在尝试为我的Windows EC2实例设置cloudwatch日志,它是一台具有4.x版EC2Config的2008 r2服务器。
1.Instance已连接到它,具有完整的云监视访问权限。 2.为了安全起见,我也试过了Access键和Secret。
默认日志适用于cloudwatch我可以看到系统事件日志,但是当我从这里尝试json时https://cloudacademy.com/blog/centralized-log-management-with-aws-cloudwatch-part-2-of-3/
我看不到任何日志。这是json
{
"EngineConfiguration": {
"PollInterval": "00:00:15",
"Components": [
{
"Id": "CustomLogs",
"FullName": "AWS.EC2.Windows.CloudWatch.CustomLog.CustomLogInputComponent,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"LogDirectoryPath": "C:\\Program Files\\Microsoft SQL Server\\MSSQL12.MSSQLSERVER\\MSSQL\\Log",
"TimestampFormat": "yyyy-MM-dd HH:mm:ss.ff",
"Encoding": "UTF-16",
"Filter": "ERRORLOG",
"CultureName": "en-US",
}
},
{
"Id": "CloudWatchLogs",
"FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"AccessKey": "",
"SecretKey": "",
"Region": "ap-southeast-2",
"LogGroup": "Database_Logs",
"LogStream": "SQL_Server_Logs"
}
}
],
"Flows": {
"Flows":
[
"CustomLogs,CloudWatchLogs"
]
}
}
}

解决这个问题的方法是什么?