Web application for script monitoring

0

What is the best way to monitor script execution? I have a script.py that needs to be running "infinitely", and I'd like to know if it's running or not. I would like a web application to do this monitoring, and if it closes, I can run it through that application. Is there any freamework that does something like this?

    
asked by anonymous 20.12.2017 / 19:53

1 answer

1

You can use Django , it's all very simple and easy to do a web application. With Django you create your web interface to monitor and enable the script.

Django already has a built-in authentication system so you can create a secure interface without work.

With your webapp ready, within the loop of your script you can call a method / function that sends a POST to the webapp "saying that everything is fine"

In case you wanted a 100% automatic process together with Django you can use Celery and create periodic tasks that check if the script is sending the "okay" if it is not you automatically configure to replay the script. p>

You can even go further and use the databases to write logs etc.

    
21.12.2017 / 00:55