Skip to content

Instantly share code, notes, and snippets.

@NotYusta
Created May 18, 2025 13:21
Show Gist options
  • Save NotYusta/8a6da42f48b650000a2e0222a1004e91 to your computer and use it in GitHub Desktop.
Save NotYusta/8a6da42f48b650000a2e0222a1004e91 to your computer and use it in GitHub Desktop.
Install full exporters
#!/bin/sh
set -e
TMP_DIR="/tmp/exporter_installers"
mkdir -p "$TMP_DIR"
NODE_EXPORTER_URL="https://gist.githubusercontent.com/NotYusta/7f0121db2fb01c60edb3d64ad1b9cd27/raw/3be376455f4ffce7e5e8018cd32254cef9595ff0/install_node_exporter.sh"
CADVISOR_URL="https://gist.githubusercontent.com/NotYusta/412c55b1d712bd717ccc310c7c48328b/raw/98e360718f1ad10bae158a60372a3ba1643949d0/install_cadvisor.sh"
SMARTCTL_URL="https://gist.githubusercontent.com/NotYusta/5ab4a72e28957575b4ed75a17f111699/raw/cf3bd3b0fc5d89c73a2e040e99afed4866a0ebc1/install_smartctl.sh"
FIREWALL_URL="https://gist.githubusercontent.com/NotYusta/af31c51a86be5b20575ecc1514f50d28/raw/3a4ef2cf15bc6a61a4d0a2b705bb619aee6e0aed/install_exporters_firewall"
download_and_run() {
NAME="$1"
URL="$2"
DEST="$TMP_DIR/$NAME.sh"
echo "Downloading $NAME installer..."
curl -sL "$URL" -o "$DEST"
chmod +x "$DEST"
echo "Running $NAME installer..."
sh "$DEST"
}
download_and_run "node_exporter" "$NODE_EXPORTER_URL"
download_and_run "cadvisor" "$CADVISOR_URL"
download_and_run "smartctl" "$SMARTCTL_URL"
download_and_run "firewall" "$FIREWALL_URL"
echo "All exporters and firewall installed successfully."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment