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

Upgraded to Get-WinEvent cmdlet #1911

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | Export-CSV $info_system/kubelet/kubelet-service.csv
Get-WinEvent -ProviderName 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 | Export-CSV $info_system/kube-proxy/kube-proxy-service.csv
Get-WinEvent -ProviderName 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 | Export-CSV $info_system/docker_log/docker-daemon.csv
Get-WinEvent -ProviderName Docker | Export-CSV $info_system/docker_log/docker-daemon.csv
Write-Host "OK" -foregroundcolor "green"
}
catch {
Expand Down