IT 3110: Systems Automation
This assignment will hone your skills as a Python script writer.
Create the following script using python:
- You script should login to several hosts and check to make sure that services are on. If services are not on, an email alert should be sent to you. (A helpful email suggestion is here
- This should be ran as a cron job every hour.
You should begin with a hosts file that has the following format:
host1:process_to_check host2:process_to_check host3:process_to_check host4:process_to_check
Maybe something like:
184.108.40.206:mysql 220.127.116.11:apache2 18.104.22.168:bind9 22.214.171.124:bind9
- Make sure you can write an appropriate shell command to see if a process is running (i.e.
system apache2 status, then grep what you want from there)
- The script should be run like this:
Pass this off in class.
Last Updated 04/08/2021