新增blackbox_exporter安装脚本

为cAdvisor添加架构判断
This commit is contained in:
CN-JS-HuiBai
2026-02-28 15:12:15 +08:00
parent afadfffda2
commit 04b667e7c4
2 changed files with 57 additions and 3 deletions

View File

@@ -16,10 +16,22 @@ else
echo "Unsupported package manager"
exit 1
fi
# 架构判断
ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then
echo "Detected x86_64 architecture"
ARCH="amd64"
elif [ "$ARCH" = "aarch64" ]; then
echo "Detected aarch64 architecture"
ARCH="arm64"
else
echo "Unsupported architecture: $ARCH"
exit 1
fi
# Download Node Exporter
CN_URL="https://s3.cloudyun.top/downloads/cadvisor-v0.55.1-linux-amd64"
GLOBAL_URL="https://github.com/google/cadvisor/releases/download/v0.55.1/cadvisor-v0.55.1-linux-amd64"
# Download Node Exporter
CN_URL="https://s3.cloudyun.top/downloads/cadvisor-v0.55.1-linux-$ARCH"
GLOBAL_URL="https://github.com/google/cadvisor/releases/download/v0.55.1/cadvisor-v0.55.1-linux-$ARCH"
TARGET=/tmp/cAdvisor
is_cn=false