I’m currently building a server monitoring application and I’m trying to integrate a script that creates asyncio tasks to check the status of specific hosts. For now I have a task that checks if a port is open and another one that pings the host with ICMP. If successful, they sleep for a specific duration (default 60 seconds) and repeat the same process, but if they fail they send an email to a specific address.
The script functions well on it’s own but I would like to create a website from which I can start and stop these tasks. However, I’m unsure on where or how I should integrate this within Django.
If anyone has any guidance or suggestions thanks in advance!