Skip to content

Commit

Permalink
Removed Sort-Object by time from Windows log collector script (#1907)
Browse files Browse the repository at this point in the history
Co-authored-by: Vincent Tran <vinvtran@amazon.com>
  • Loading branch information
VincentVTran and Vincent Tran authored Aug 5, 2024
1 parent a8c5f1f commit 069c0eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions log-collector-script/windows/eks-log-collector.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Function get_eks_logs{
Function get_k8s_info{
try {
Write-Host "Collecting Kubelet logs"
Get-EventLog -LogName EKS -Source kubelet | Sort-Object Time | Export-CSV $info_system/kubelet/kubelet-service.csv
Get-EventLog -LogName EKS -Source kubelet | Export-CSV $info_system/kubelet/kubelet-service.csv
Write-Host "OK" -foregroundcolor "green"
}
catch{
Expand All @@ -278,7 +278,7 @@ Function get_k8s_info{

try {
Write-Host "Collecting Kube-proxy logs"
Get-EventLog -LogName EKS -Source kube-proxy | Sort-Object Time | Export-CSV $info_system/kube-proxy/kube-proxy-service.csv
Get-EventLog -LogName EKS -Source kube-proxy | Export-CSV $info_system/kube-proxy/kube-proxy-service.csv
Write-Host "OK" -foregroundcolor "green"
}
catch{
Expand All @@ -303,7 +303,7 @@ Function get_docker_logs{
Write-Host "Collecting Docker daemon logs"
if (check_service_installed_and_running "docker") {
try {
Get-EventLog -LogName Application -Source Docker | Sort-Object Time | Export-CSV $info_system/docker_log/docker-daemon.csv
Get-EventLog -LogName Application -Source Docker | Export-CSV $info_system/docker_log/docker-daemon.csv
Write-Host "OK" -foregroundcolor "green"
}
catch {
Expand Down

0 comments on commit 069c0eb

Please sign in to comment.