Skip to content

Instantly share code, notes, and snippets.

@SindreSvendby
Created November 30, 2015 16:52
Show Gist options
  • Save SindreSvendby/a3adcb393a1224bf300f to your computer and use it in GitHub Desktop.
Save SindreSvendby/a3adcb393a1224bf300f to your computer and use it in GitHub Desktop.
remove all logentries drains setup in heroku.
#!/bin/bash
for app in `heroku list | grep [a-z] | cut -d " " -f 1`; do
for logDrains in `heroku drains -a $app 2>/dev/null | grep ^syslog`; do
if [[ $logDrains == *"logentries"* ]]; then
echo "`heroku drains:remove $logDrains -a $app` for $app";
else
echo "Skipping $logDrains"
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment