Repository navigation
Configuration Editor and Scripts
The editor reads direct regular .conf and .sh files inside /etc/vnstat.
Other paths, nested files, unsupported types, and symlinks are rejected. Wait for
the selected file to load before editing/saving.
A successful save updates runtime and persistent copies. Writes are staged, checked, and replaced individually; handled partial failures trigger rollback. If rollback retains a recovery copy, its location appears in the save endpoint's JSON error response and is displayed as plain text in the editor's error message. Switching files, cancelling, or leaving with unsaved edits prompts for confirmation. Edits made during a save remain unsaved after that request completes. RAM and flash cannot be committed as one power-loss-atomic filesystem transaction.
Edit dvm-user-actions.sh to add commands inside its existing functions.
Keep commands inside function bodies because the notifier sources this file.
Names cover hour/day/month/year, RX/TX, and reached/normal transitions, such as
hour_rx_reached and hour_rx_normal_again.
| Argument | Meaning |
|---|---|
$1 |
Alarm ID: 0 for the primary group, 1–6 for a secondary slot. |
$2 |
Monitored interface name. |
dvm-custom-alarms.sh is an independent advanced script. Its schedule is
separate from built-in thresholds and user-action switches. Choose Never, 1, 15,
30, 45, or 60 minutes. The 45-minute runner uses epoch-minute slots to preserve
45-minute spacing across hour boundaries; enabling it does not imply an
immediate run. Other intervals use their configured cron schedules.
Retain the supplied service-running guard. A custom script can perform whatever commands you place in it, so test its actions deliberately. The supplied commented example calls the same validated threshold evaluator as the built-in rules and explicitly handles normal, exceeded, disabled, and error results. Unavailable measurements must never be interpreted as an exceeded limit.
The periodic custom-alarm script is separate from threshold transition functions. Its commented example uses the shared evaluator and explicitly avoids actions on disabled/error results. Commands placed in a custom script remain the administrator's responsibility; ordinary action retries do not provide retries for arbitrary periodic custom-alarm code.
This installed-host query uses the same evaluator as DVM's built-in rules:
php /usr/local/emhttp/plugins/dvm/include/dvm_threshold.php eth0 d 100 GB rxThe arguments are interface, period, limit, unit, and direction. It prints
normal, exceeded, disabled, or error; error exits with status 3. This
command evaluates a threshold and does not stop containers, change VM links,
send notifications, or invoke user functions. Change the example interface and
limit to suit the host. The supplied custom-alarm file contains a commented
case-based example that explicitly performs no workload action for unavailable
or disabled results.
Data Volume Monitor · Issues · License
Stable and Development share the dvm identity. Keep independent backups; manual host-acceptance items remain pending until observed.
- Home
- Installation and channels
- First-time setup
- Thresholds and notifications
- Docker, VM, and custom actions
- Reports and displays
- Editor and scripts
- Backup and recovery
- Original-plugin migration
- Reset, purge, and uninstall
- Troubleshooting and support
- vnStat backend
- Development and releases
- Host acceptance