Runs a script which checks on available space left in a container and sends a Slack notification if it is too low.
For setup, run this command to get your environment variables setup. Real values are stored in 1Password.
cp .docker-development-vars.example .docker-development-vars
To run the container:
bin/run
Make changes in check.rb for changes to behavior.
Builds are done via Docker Hub auto repository builds. On every push Docker Hub will build and tag a new version of the image as latest.
If you want a versioned release then make a new tag in the format of v1 or v2, etc. Docker Hub will find that tag and build a new image from with that name.
Deploy using this image: brandnewbox/disk-check-notifier:v2
You'll need two environment variables:
SLACK_WEBHOOK - The slack webhook you want to send notifications toPROJECT_NAME - A meaningful / identifying name of your projectCHANNEL - Optional. The slack channel to send noficiations to. Defaults to #devopsSLEEP_DURATION_IN_MINUTES - Optional. The number of minutes between runs. Defaults to 60.LOW_THRESHOLD_PERCENTAGE - Optional. The low threshold of remaining disk percentage. If the amount of free disk remaining dips below this, notifications are sent. Defaults to 20.If you would like to see a working example at BNB, checkout Friends PFS or COLA GIS.
Content type
Image
Digest
Size
30.8 MB
Last updated
over 5 years ago
docker pull brandnewbox/disk-check-notifier