Sending automatic mails when the app is not working

Hello,

I’m thinking of adding an automatic reply mail to be sent to some users when the application is not working.What do you think is the best approach to this?I have currently 7 application for this project so I was only thinking of two of them sending the report.

It should be something like:
Downtimes:

When there is no new data into production history,it fails to work or gets disconnected.It should send the automatic mail in this order:

Level 1: 2 minutes downtime e-mail user1 Text: KED33 since 2 minutes down

Level 2: 5 minutes downtime e-mail user2

Level 3: 8 minutes downtime e-mail user3

What I have so far is,but I don’t know how to make it with levels and with plotly app.Any suggestion is welcomed.

import win32com.client

outlook = win32com.client.Dispatch('outlook.application')

#create email object 
mail = outlook.CreateItem(0)


mail.To = "user1"
mail.Subject = "Escalation matrix for testing automatic alerts"
#mail.HTMLBody = <h3>This is HTML Body</h3>
mail.Body = "Hello,"
#mail.Attachments.Add('c:\\sample.xlsx')
#mail.Attachments.Add('c:\\sample2.xlsx')
#mail.CC = "/"

mail.Send()

I suggest you think another way, how do you tell if the app is not working? Try some daemon monitoring tools, such as the common supervisor+gunicorn. You don’t have to know about the downtime, it doesn’t make sense. There are warning levels already specified in the server logs, and tools like Supervisor also provide email configuration. You don’t have to do all the things yourself.

That sounds like a plan,do you maybe know any alternatives for windows? I was think maybe of using a Nagios-Server.But I’m still deciding.

IIS + wfastcgi or Apache + mod_wsgi