System::DiskAndUpdatesAlerts
System::DiskAndUpdatesAlerts
Send email alert about disk capacity and pending updates.
Features
Reports when exceed
$disk-limit-percentcapacity at any mount point or letter drive.Reports the pending updates from popular GNU/Linux package managers or Windows Update.
Nice HTML table format.
Installing the module
zef update
zef install System::DiskAndUpdatesAlertsModule dependencies
- FileSystem::Capacity
- Package::UpdatesExample:
use v6;
use System::DiskAndUpdatesAlerts;
# Target email server
my $smtp-server = 'smtp.foo.com';
# SMTP port from target email server
my $smtp-port = 25;
# alert from address; whatever but descriptive
my $from = '[email protected]';
# The receiver of alerts
my $to = '[email protected]';
# Reaching this percent reports the disk alert
my $disk-limit-percent = 75;
# Send alerts
send-alerts(:$smtp-server, :$smtp-port, :$from, :$to, :$disk-limit-percent);Windows considerations
The get-updates.ps1 Powershell script must be located in the same directory as the Perl6 script.
SMTP client considerations
Sender authentication is not supported.
Encrypted transmission is not supported.
The current hostname and
$fromemail address must have no restrictions to send email messages to$smtp-portat$smtp-server.The
$toemail address must exist at$smtp-serveremail server system.