Description
Supervisor is a great program that takes care about the healthy of your application.
The main feature is to monitor your application and then if something happens e.g. crash, it will restart the program.
There is a web interface where you can check the healthy of your programs and check uptime and logs, also you can stop/restart the process.
Installing
The follow command is to install supervisor on your Ubuntu/Debian machine:
sudo apt-get install supervisor
Configuration
The configuration file is located on your etc folder, I found it into /etc/supervisor/supervisor.conf on my Ubuntu.
You can easier add your applications to the file, just following the guide at this link, but I can give you some advice to configure it.
Each application that you want to monitor have to start with this header:
Add your path where the application is:
After that, restart your supervisor and everything should be fine.
Enable Web Interface
Usually the web interface is not enabled by default but you can do it , just adding these 3 lines on your configuration file
Supervisor is a great program that takes care about the healthy of your application.
The main feature is to monitor your application and then if something happens e.g. crash, it will restart the program.
There is a web interface where you can check the healthy of your programs and check uptime and logs, also you can stop/restart the process.
Installing
The follow command is to install supervisor on your Ubuntu/Debian machine:
sudo apt-get install supervisor
Configuration
The configuration file is located on your etc folder, I found it into /etc/supervisor/supervisor.conf on my Ubuntu.
You can easier add your applications to the file, just following the guide at this link, but I can give you some advice to configure it.
Each application that you want to monitor have to start with this header:
Add your path where the application is:
and the process name
after that you are ready to restart your supervisor and it should start the process, just check it with "ps aux".
If everything is fine, continue to add more features, otherwise go back and check what is wrong.
These are helpful settings that you should have on your process that makes it alive even if it crashes
Also add some settings to save all logs from your application:
After that, restart your supervisor and everything should be fine.
Enable Web Interface
Usually the web interface is not enabled by default but you can do it , just adding these 3 lines on your configuration file
No comments:
Post a Comment