Raku Land

System::DiskAndUpdatesAlerts

github:ramiroencinas

System::DiskAndUpdatesAlerts

Build Status

Send email alert about disk capacity and pending updates.

Features

Installing the module

zef update
zef install System::DiskAndUpdatesAlerts

Module dependencies

- FileSystem::Capacity
- Package::Updates

Example:

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 = 'alerts@foo.com';

# The receiver of alerts
my $to = 'sysadmin@foo.com';

# 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