我試圖將EC2啓動日誌從基於我2016年贏得的EC2實例轉發到cloudwatch。AWS EC2在cloudwatch windows 2016中啓動日誌image
由於某種原因,我無法看到此特定類別的日誌組。
這裏的例子我AWS.EC2.Windows.CloudWatch.json
:
{
"IsEnabled": true,
"EngineConfiguration": {
"PollInterval": "00:00:15",
"Components": [
{
"Id": "Ec2Config",
"FullName": "AWS.EC2.Windows.CloudWatch.CustomLog.CustomLogInputComponent,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"LogDirectoryPath": "C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Log",
"TimestampFormat": "yyyy-MM-ddTHH:mm:ss.fffZ:",
"Encoding": "UTF-8",
"Filter": "UserdataExecution.log",
"CultureName": "en-US",
"TimeZoneKind": "UTC"
}
},
{
"Id": "EC2ConfigSink",
"FullName": "AWS.EC2.Windows.CloudWatch.CloudWatchLogsOutput,AWS.EC2.Windows.CloudWatch",
"Parameters": {
"Region": "eu-west-1",
"LogGroup": "/my-customer/deployment/ec2config-userdata",
"LogStream": "ec2config-userdata"
}
}
...
I have a few more definitions in this file
...],
"Flows": {
"Flows":
[
"Ec2Config,EC2ConfigSink",
... other references here
]
}
}
CloudWatch的代理程序開始,並且不會報告任何錯誤,我可以看到其他來源的數據(一些應用程序日誌文件 - 我跳過了定義故意)
這意味着cloudwatch配置文件是正確的,並將其應用/放置在正確的目錄中。
日誌通過沒有問題,除了EC2發射日誌。
我想知道是否有人遇到這個問題?它可以在基於Windows 2012的映像上完美運行