Due: November 15, 2023
Lets create a tool that can monitor website uptime.
Write a program that sends a GET request to a website and sends an alert email if the website is down. The website and email is specified using a configuration file with this format and name and it should be in the same directory from which the program is run:
config.json { “website” : “https://…..”, “alert”, “hello@email address” , “poll-interval”: 10 }
Please use a json parser to parse the configuration file. The poll-interval attribute specifies the interval (in seconds) at which the tool should check the website.
When you monitor the website, please compute the latency between the request and the response and display that on the console or a webpage.
Your monitor should have a mechanism to restart in case it crashes. Then deliberately kill the process and show how the process restarts.
Show using an experiment the output from the tool with these scenarios:
- A website in the US
- A slow website outside the US
- Create your own website and shut it down and bring it up after 5-10 seconds
Calculate the monthly cost of deploying your system in the cloud.