https://github.com/mtzanidakis/dirsizer
Send a notification when a directory exceeds a certain size
https://github.com/mtzanidakis/dirsizer
e-mail filesystem monitoring
Last synced: 10 months ago
JSON representation
Send a notification when a directory exceeds a certain size
- Host: GitHub
- URL: https://github.com/mtzanidakis/dirsizer
- Owner: mtzanidakis
- License: mit
- Created: 2022-03-15T15:41:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-11T13:49:51.000Z (over 1 year ago)
- Last Synced: 2025-01-24T15:42:01.288Z (12 months ago)
- Topics: e-mail, filesystem, monitoring
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dirsizer
Send a notification via e-mail when a directory exceeds a certain size.
## Configuration
The following configuration options are available, passed as environment variables:
- `DIRECTORY`: The path to the directory to monitor; defaults to `.`.
- `IDENTIFIER`: A unique identifier for the directory, used in the e-mail subject.
- `MAIL_FROM`: The e-mail address to send the notification from; defaults to `dirsizer@localhost`.
- `MAIL_TO`: The e-mail address to send the notification to; defaults to `root`.
- `SMTP_SERVER`: The SMTP server to use for sending the e-mail; defaults to `localhost:25`.
- `THRESHOLD`: The size in bytes at which to send the notification; defaults to `500M`.
## Usage
Dirsizer can be used in docker compose as a sidecar to any service. For an example check the [docker-compose.yml](docker-compose.yml).