75 lines
1.9 KiB
Groff
75 lines
1.9 KiB
Groff
.\" Automatically generated by Pandoc 2.19.2
|
|
.\"
|
|
.\" Define V font for inline verbatim, using C font in formats
|
|
.\" that render this, and otherwise B font.
|
|
.ie "\f[CB]x\f[]"x" \{\
|
|
. ftr V B
|
|
. ftr VI BI
|
|
. ftr VB B
|
|
. ftr VBI BI
|
|
.\}
|
|
.el \{\
|
|
. ftr V CR
|
|
. ftr VI CI
|
|
. ftr VB CB
|
|
. ftr VBI CBI
|
|
.\}
|
|
.TH "disk_space_alert" "1" "January 2023" "disk_space_alert" ""
|
|
.hy
|
|
.SH NAME
|
|
.PP
|
|
disk_space_alert - Checks available disk space and sends out
|
|
notification via mail.
|
|
Configuration is done in environment files.
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
It\[cq]s part of \f[B]system-helpers\f[R].
|
|
.SH SYNOPSIS
|
|
.PP
|
|
\f[B]disk_space_alert\f[R]
|
|
.SH DESCRIPTION
|
|
.PP
|
|
\f[B]disk_space_alert\f[R] checks available diskspace for configured
|
|
\f[B]mounts\f[R] and sends out a mail if certain limits are reached.
|
|
It comes with systemd services.
|
|
.PP
|
|
By default, \f[B]disk_space_alert\f[R] tries to read from
|
|
\f[I]$HOME/.disk_space_alert.conf\f[R] and
|
|
\f[I]/etc/disk_space_alert.conf\f[R] for configuration.
|
|
It will exit with a non-zero exit code if it cannot find a proper
|
|
configuration file.
|
|
.PP
|
|
The following are at least required for the script to work:
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
- \f[B]DISK_SPACE_ALERT_MAIL_ADDRESS=\[lq]\[lq]\f[R] which requires
|
|
\f[I]mail.rc\f[R] to be configured and `\f[I]mailx\f[R]' command has be
|
|
available.
|
|
.PD 0
|
|
.P
|
|
.PD
|
|
.PP
|
|
The following are optional or have reasonable defaults: -
|
|
\f[B]DISK_SPACE_ALERT_THRESHOLD=93\f[R] in percentage -
|
|
\f[B]DISK_SPACE_ALERT_MOUNTPOINTS=(\[lq]/\[rq])\f[R] is an array of
|
|
mountpoints
|
|
.PP
|
|
You can copy this script to \f[I]/usr/local/bin\f[R] and use create a
|
|
custom \f[B]CONFIG_FILE\f[R] as user.
|
|
.SH EXAMPLE
|
|
.PP
|
|
Create a \f[I]$HOME/.disk_space_alert.conf\f[R] and add
|
|
\f[I]DISK_SPACE_ALERT_MAIL_ADDRESS=\[lq]alias\[at]domain.tld\[rq]\f[R].
|
|
Notifications will be delivered to alias\[at]domain.tld.
|
|
Examples can be found in \f[I]/usr/share/doc/disk_space_alert\f[R].
|
|
.SH EXIT VALUES
|
|
.TP
|
|
\f[B]0\f[R]
|
|
Success
|
|
.TP
|
|
\f[B]1\f[R]
|
|
Error
|
|
.SH AUTHORS
|
|
Alexander Sch\[:a]ferdiek.
|