File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -856,7 +856,7 @@ install() {
856856 create_dir " $EXTRACT_DIR "
857857 # PROMETHEUS_INSTALL_SCRIPT
858858 message_box " $APP_NAME Installer $INSATLLER_VERSION " 0
859- message_box " Welcome on board: $( echo " $USER_NAME " | sed ' s/.*/\u&/' ) " 3
859+ message_box " Welcome on board: $( echo " $USER_NAME " | sed ' s/.*/\u&/' ) " 0
860860 check_dependencies
861861
862862 message_box " Choose the installation method\nNote: Release is recommended for production use." 0
Original file line number Diff line number Diff line change 77from src .models import GeneralSettings , SystemInformation
88from sqlalchemy .exc import SQLAlchemyError
99from prometheus_client import Counter , Gauge
10- import os
10+ import os , time
1111
1212from src .logger import logger
1313# Flag to track if logging is already scheduled
Original file line number Diff line number Diff line change @@ -45,23 +45,26 @@ if docker ps -a --format '{{.Names}}' | grep -q "$CONTAINER_NAME"; then
4545 log " Container $CONTAINER_NAME already exists. Stopping and removing it."
4646 docker stop " $CONTAINER_NAME " & > /dev/null
4747 docker rm " $CONTAINER_NAME " & > /dev/null
48+ else
49+ log " No existing container found. Proceeding to start a new one."
4850fi
4951
5052# Run Prometheus container
5153log " Starting Prometheus container: $CONTAINER_NAME "
52- docker run -d \
54+ run_output= $( docker run -d \
5355 --name " $CONTAINER_NAME " \
5456 --network " $NETWORK_NAME " \
5557 -p " $PROMETHEUS_PORT :$PROMETHEUS_PORT " \
5658 --restart unless-stopped \
5759 -v " $PROMETHEUS_CONFIG_FILE :/etc/prometheus/prometheus.yml" \
58- " $PROMETHEUS_IMAGE " & > /dev/null
60+ " $PROMETHEUS_IMAGE " 2>&1 ) # Capture both stdout and stderr
5961
6062# Check if Prometheus started successfully
6163if [ $? -eq 0 ]; then
6264 log " Prometheus container $CONTAINER_NAME started successfully on port $PROMETHEUS_PORT ."
6365 log " Prometheus config file located at $PROMETHEUS_CONFIG_FILE "
6466else
65- echo " [ERROR] Failed to start Prometheus container."
67+ echo " [ERROR] Failed to start Prometheus container: $run_output "
68+ echo " [ERROR] Checking logs for container: $CONTAINER_NAME "
6669 exit 1
6770fi
You can’t perform that action at this time.
0 commit comments