Application Monitor
TheThis script is unofficial and not supported by Ultra.cc staff.
The Application monitor script can be used to automatically restart applications if they go offline unexpectedly. The activity can be logged to a log file or be sent to Discord.
Installation
Before you can proceed with installing the Application monitor script, Python needs to be version 3.6 or above.
Upgrade Python
- Connect to your Ultra.cc slot via SSH, see guide here.
- Once connected, execute the following command:
bash <(wget -qO- https://scripts.usbx.me/util/Python-Installer/main.sh)
- Type
confirm
to proceed with the installation. - Next, pick a Python version above 3.6 or type
4
for latest version - Press ENTER to confirm.
- When the installation has finished, execute the following command:
source ~/.profile
With Python updated to version 3.6 or above, you can proceed the installation.
Install Application Monitor
- Execute the following command:
bash <(wget -qO- https://scripts.usbx.me/util/All_app_monitor/app_monitor_installer.sh)
- Type
confirm
to proceed with the installation. - Next, you will be presented with three options:
Please choose option from below if you want notification on discord or info as a log file on your service
1. Store Applications status on your service at {~/script/app_monitor}
2. To get application status on your Discord(You need Discord Webhook for it)
3. To uninstall the script.
Please select option 1 or 2:
OPTION 1:
- Press
1
to store application status in a log file on your service. PressENTER
to confirm. - Type the application names you want to monitor, separated with single spaces:
radarr sonarr prowlarr
etc. - Press
ENTER
to confirm.
OPTION 2:
- Press
2
to push application status notifications to Discord via webhook. PressENTER
to confirm. - Paste your Discord webhook URL.
- Press
ENTER
to confirm.
Uninstallation
- Execute the following command:
bash <(wget -qO- https://scripts.usbx.me/util/All_app_monitor/app_monitor_installer.sh)
- Type
confirm
to proceed with the installation. - Next, you will be presented with three options:
- Press
3
to uninstall script. PressENTER
to confirm.
The script will ask you to confirm the uninstallation with YES or NO.
- Press
1
for uninstall. PressENTER
to confirm.
Log Location
- For users who are storing logs, they can be found at these locations:
-
Torrent Client Logs:
~/scripts/app_monitor/torrent_clients.log
-
Docker Application Logs:
~/scripts/app_monitor/docker_apps.log
Caveats
1. Do not uninstall applications that are being monitored by the Application Monitor script
- You should only monitor applications that you do not plan to uninstall. OR set up the script again before uninstalling a monitored application.
2. An issue that may occur with manual upgrades of docker applications
- The script checks all applications periodically and either restarts or upgrades them. If you upgrade an application manually, it will be down for a certain amount of time. If the script happens to run when the application is down due to your manual upgrade action, the script will queue another upgrade. This will result in your application upgrading twice, it's not a major issue, but it's not ideal either.