Configuration
After installation, the notifier
utility needs to be configured via the application settings file.
Instructions for customizing the application are provided below.
At any time, the notifier --validate
command can be run to validate the current application settings.
Email Notification Template
The email message issued to users is customizable via a template file located at /etc/notifier/template.html
.
The default template is as follows:
<p>
This is an automated notification concerning your storage quota.
One or more of your quotas has recently surpassed a usage threshold triggering an automated notification.
Your storage usage is as follows:
</p>
<p>
{usage_summary}
</p>
<p>
Sincerely,
</p>
<p>
The CRC Quota Bot
</p>
Users are encouraged to customize the template to fit their needs. Automatically formatted fields are indicated using curly braces and are detailed below:
Template Field |
Summary |
---|---|
|
A plain text table summarizing the user’s current storage usage. |
Application Settings
Application settings are configurable via a settings file at /etc/notifier/settings.json
.
If this file does not exist, the application will run using the default settings.
A full list of available settings and their defaults is provided below.
Core Settings
Important
The top level file_systems
field is a nested field and entries
should adhere to the File System Settings schema outlined below.
Setting |
Default Value |
Description |
---|---|---|
ihome_quota_path |
|
Path to ihome storage information. |
file_systems |
|
List of file systems to examine. See the File System Settings section for details |
uid_blacklist |
|
Do not notify users with these UID values. |
gid_blacklist |
|
Do not notify groups with these GID values. |
disk_timeout |
|
Give up on checking a file system after the given number of seconds. |
log_level log_level |
|
Application logging level.
One of |
log_path |
Optionally log application events to a file. |
|
smtp_host |
Matches system default. |
Name of the SMTP host server. |
smtp_port |
Matches system default. |
Port for the SMTP server. |
db_url |
|
URL for the application database. By default, a SQLITE database is created in the working directory. |
email_from |
|
From address for automatically generated emails. |
email_subject |
|
Subject line for automatically generated emails. |
email_domain |
|
String to append to usernames when
generating user email addresses. The
leading |
admin_emails |
|
Admin users to contact when the application encounters a critical issue. |
debug |
|
Disable database commits and email notifications. Useful for development and testing. |
File System Settings
The following fields are required when defining which file systems to scan.
Setting |
Description |
---|---|
name |
Human-readable name for the file system. |
path |
Absolute path to the mounted file system. |
type |
Type of the file system. Options: |
thresholds |
Usage percentages to issue notifications for. |