Sign inSign up

brandnewbox/disk-check-notifier

By brandnewbox

•Updated over 5 years ago

Image
0

361

brandnewbox/disk-check-notifier repository overview

⁠Disk Space Notifier

Runs a script which checks on available space left in a container and sends a Slack notification if it is too low.

⁠Development

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.

⁠Deployment

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 to
  • PROJECT_NAME - A meaningful / identifying name of your project
  • CHANNEL - Optional. The slack channel to send noficiations to. Defaults to #devops
  • SLEEP_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.

Tag summary

Content type

Image

Digest

Size

30.8 MB

Last updated

over 5 years ago

docker pull brandnewbox/disk-check-notifier