Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to collect Windows Events relevant to Windows Containers #1739

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

KlwntSingh
Copy link
Contributor

Issue #, if available:
During investigation of one of EKS Windows ticket, there was challenge during co-relation of logs. This script could be improved to collect even more logs which are relevant to Windows containers.

Description of changes:
Following are events which will be collected as part of this PR.

  1. Application - Windows Application events
  2. EKS - Events related to EKS
  3. System - Windows system events
  4. Microsoft-Windows-Containers - Windows containers related events
  5. Microsoft-Windows-Host-Network-Service - Windows Container networking events
  6. Microsoft-Windows-Hyper-V-Compute - Windows container compute service events

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

  1. I tested this script on both 2019 and 2022 EKS Windows AMIs. Script collected these logs as expected.

See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.

…and EKS

1. Application - Windows Application events
2. EKS - Events related to EKS
3. System - Windows system events
4. Microsoft-Windows-Containers - Windows containers related events
5. Microsoft-Windows-Host-Network-Service - Windows Container networking events
6. Microsoft-Windows-Hyper-V-Compute - Windows container compute service events
Copy link

@jiechen0826 jiechen0826 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I was able to run the new script and downloaded the additional event logs.

Function get_windows_events{
try {
Write-Host "Collecting Windows events"
Copy-Item "$env:SystemDrive\Windows\System32\Winevt\Logs\Application.evtx" -Destination $info_system\events

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you intend to keep them as event files? The event format is easy to view in Windows instances, but will be difficult to view in other OS machines.

Copy link
Contributor Author

@KlwntSingh KlwntSingh Mar 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are right this will be difficult to view on Mac but there are 3party tools which can be used to view on mac. They can be exported to csv from event file if that turns out to be the case.
There is benefit to viewing in Windows event viewer, It will be easy to sort events in Windows.

@cartermckinnon cartermckinnon merged commit 5f96c38 into awslabs:main Mar 28, 2024
10 checks passed
atmosx pushed a commit to gathertown/amazon-eks-ami that referenced this pull request Jun 18, 2024
…and EKS (awslabs#1739)

1. Application - Windows Application events
2. EKS - Events related to EKS
3. System - Windows system events
4. Microsoft-Windows-Containers - Windows containers related events
5. Microsoft-Windows-Host-Network-Service - Windows Container networking events
6. Microsoft-Windows-Hyper-V-Compute - Windows container compute service events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants