PLATFORM: Collect AWS EKS log and OS log files for troubleshooting AWS EKS Infra issues

AuthorFullName__c
Jayanth Suresh
articleNumber
000006031
FirstPublishedDate
2024-02-08T10:36:59Z
lastModifiedDate
2025-05-14

PLATFORM: Collect AWS EKS log and OS log files for troubleshooting AWS EKS Infra issues

We see customers facing performance/Infra issues in AWS EKS clusters with JFrog product.In some case to investigate the issue,we might need EKS clusters logs and configurations along with the JFrog product support bundle or JFrog Artifactory Data Collector (for JFrog Artifactory)  to analyze and identify the  bottleneck of the issue. So to collect the complete information like Amazon EKS log files and OS logs for troubleshooting Amazon EKS. Please follow the below steps:

EKS Logs Collector (Linux)
Usage

At a high level, you run this script on your Kubernetes node, and it will collect system information, configuration and logs that will assist in troubleshooting issues with your node. 

  • Run this script as the root user
curl -O https://github.com/JayanthSureshjfrog/amazon-eks-ami/blob/master/log-collector-script/linux/eks-log-collector.sh
sudo bash eks-log-collector.sh

Confirm if the tarball file was successfully created (it can be .tgz or .tar.gz)

Example output

The script can be used in normal or enable_debug (Caution: enable_debug will prompt to confirm if we can restart Docker daemon which would kill running containers).
$ sudo bash eks-log-collector.sh --help

USAGE: eks-log-collector --help [ --ignore_introspection=true|false --ignore_metrics=true|false ]

OPTIONS:

   --ignore_introspection To ignore introspection of IPAMD; Pass this flag if DISABLE_INTROSPECTION is enabled on CNI

   --ignore_metrics Variable To ignore prometheus metrics collection; Pass this flag if DISABLE_METRICS enabled on CNI

   --help  Show this help message.

Example output in normal mode

The following output shows this project running in normal mode.

$ sudo bash eks-log-collector.sh

        This is version 0.7.3. New versions can be found at https://github.com/JayanthSureshjfrog/amazon-eks-ami/blob/master/log-collector-script/linux/

Trying to collect common operating system logs...
Trying to collect kernel logs...
Trying to collect mount points and volume information...
Trying to collect SELinux status...
Trying to collect iptables information...
Trying to collect installed packages...
Trying to collect active system services...
Trying to Collect Containerd daemon information...
Trying to Collect Containerd running information...
Trying to Collect Docker daemon information...

        Warning: The Docker daemon is not running.

Trying to collect kubelet information...
Trying to collect L-IPAMD introspection information... Trying to collect L-IPAMD prometheus metrics... Trying to collect L-IPAMD checkpoint...
Trying to collect Multus logs if they exist...
Trying to collect sysctls information...
Trying to collect networking infomation... conntrack v1.4.4 (conntrack-tools): 165 flow entries have been shown.

Trying to collect CNI configuration information...
Trying to collect Docker daemon logs...
Trying to Collect sandbox-image daemon information...
Trying to Collect CPU Throttled Process Information...
Trying to Collect IO Throttled Process Information...
Trying to archive gathered information...

        Done... your bundled logs are located in /var/log/eks_i-XXXXXXXXXXXXXXXXX_2024-02-02_1639-UTC_0.7.3.tar.gz


To collect EKS logs using an SSM agent, refer to this Link
Once the logs are collected(eks_i-XXXXXXX.tar.gz), please share them with us via the below cURL command.

curl -i -T {eks_i-XXXXXXX.tar.gz} "https://supportlogs.jfrog.com/logs/<ticket-number>/"

*No username and password are required.