Final project files for the Google IT Automation with Python Professional Certificate in Coursera.
Used the PIL Library to update .TIFF files in a folder to new specifications: a) 600 x 400 pixel b) .JPEG format
Uploads the converted images to the web server using a POST request.
Reads from .txt files in a folder, uploads the text to the web server, and stores the text uploaded in a variable for an email script.
Generates a PDF file using Reportlab's Platypus.
Generates an email using email.message module and sends the email using the smtplib module
Reads some data from variable stored from run.py, turns it into a string as an argument for reports.generate_report(). This script also sets the variables and calls for emails.generate_email() and emails.send_email().
The script will run in the background (see cron_file) to check the following: a) CPU usage is over 80% b) Available disk space is lower than 20% c) Available memory is less than 500mb d) The hostname cannot be resolved to "127.0.0.1"
An email will be sent if the metrics is beyond the threshold using the emails.generate_email() method.