Skip to content

Instantly share code, notes, and snippets.

@NotYusta
Last active December 5, 2025 06:43
Show Gist options
  • Select an option

  • Save NotYusta/a067611a3f47c26d1e1c543fbefe1637 to your computer and use it in GitHub Desktop.

Select an option

Save NotYusta/a067611a3f47c26d1e1c543fbefe1637 to your computer and use it in GitHub Desktop.
install_bare_metal_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"
SMARTCTL_URL="https://gist.githubusercontent.com/NotYusta/5ab4a72e28957575b4ed75a17f111699/raw/cf3bd3b0fc5d89c73a2e040e99afed4866a0ebc1/install_smartctl.sh"
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"
echo "All exporters installed successfully."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment