Last active
May 18, 2025 13:16
-
-
Save NotYusta/514fdeb80467f510fa700456e816ac4e to your computer and use it in GitHub Desktop.
Node & Smartctl exporter - Full
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" | |
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 "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