The below portion of the script will automatically fail on Azure Linux VMs. Azure does not allow ping to be used by default.
I had to remove this check from the script to properly get the script to complete and have Loggly configured on the VM.
checks if all the various endpoints used for configuring loggly are accessible
checkIfLogglyServersAccessible()
{
echo "INFO: Checking if $LOGS_01_HOST is reachable."
if [ $(ping -c 1 $LOGS_01_HOST | grep "1 packets transmitted, 1 received, 0% packet loss" | wc -l) == 1 ]; then
echo "INFO: $LOGS_01_HOST is reachable."
else
logMsgToConfigSysLog "ERROR" "ERROR: $LOGS_01_HOST is not reachable. Please check your network and firewall settings."
exit 1