Skip to content

Commit

Permalink
EKS logs collector script kube-proxy IPVS information scrape (#1795)
Browse files Browse the repository at this point in the history
* eks-log-script ipvs-info

* eks-log-script ipvs-info label

* shfmt lint

* ipvscript-collect

* tee-file-existing
  • Loading branch information
AbeOwlu authored Oct 18, 2024
1 parent 3c2e712 commit c6e8ef0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions log-collector-script/linux/eks-log-collector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,20 @@ get_iptables_info() {
ip6tables-save > "${COLLECT_DIR}"/networking/ip6tables-save.txt
fi

if ! command -v ipvsadm && command -v ipset > /dev/null 2>&1; then
echo "IPVS Linux kernel module not installed" | tee ipvsadm.txt ipset.txt
else
# check that ip_vs module is loaded in get_modinfo()
try "collect ipvs information"
ipvsadm --save | tee "${COLLECT_DIR}"/networking/ipvsadm.txt && sed -i '1s/^/add:service/server \tprotocol \tvirtual-server \tscheduler algorithm \treal-server \n/' "${COLLECT_DIR}"/networking/ipvsadm.txt
ipvsadm --list --numeric --rate | tee -a "${COLLECT_DIR}"/networking/ipvsadm.txt
ok -e "\n" | tee -a "${COLLECT_DIR}"/networking/ipvsadm.txt
ipvsadm --list --numeric --stats --exact | tee -a "${COLLECT_DIR}"/networking/ipvsadm.txt
ipset --list | tee "${COLLECT_DIR}"/networking/ipset.txt
ok -e "\n" | tee -a "${COLLECT_DIR}"/networking/ipset.txt
ipset --save | tee -a "${COLLECT_DIR}"/networking/ipset.txt
fi

ok
}

Expand Down Expand Up @@ -412,6 +426,7 @@ get_kernel_info() {
get_modinfo() {
try "collect modinfo"
modinfo lustre > "${COLLECT_DIR}/modinfo/lustre"
lsmod | grep -e ip_vs -e nf_conntrack > "${COLLECT_DIR}/modinfo/ip_vs"
}

get_docker_logs() {
Expand Down

0 comments on commit c6e8ef0

Please sign in to comment.