Skip to content

Instantly share code, notes, and snippets.

@SuperQ
Created September 23, 2020 08:36
Show Gist options
  • Save SuperQ/504163c156f6583b6d894fe96a5779d9 to your computer and use it in GitHub Desktop.
Save SuperQ/504163c156f6583b6d894fe96a5779d9 to your computer and use it in GitHub Desktop.
A script to check internet connectivity with the node_exporter textfile
#!/usr/bin/env sh
if curl -s -f -o /dev/null https://www.google.com; then
echo "node_internet_connected 1"
else
echo "node_internet_connected 0"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment