From faf607b56cc6c9b47b855b2fd9cce80bb1d99f5a Mon Sep 17 00:00:00 2001 From: continuist Date: Sun, 29 Jun 2025 17:40:45 -0400 Subject: [PATCH] Update monitor script for Harbor --- scripts/monitor.sh | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/scripts/monitor.sh b/scripts/monitor.sh index 39970d8..bb2c6cb 100755 --- a/scripts/monitor.sh +++ b/scripts/monitor.sh @@ -111,17 +111,12 @@ monitor_ci_cd() { echo "Uptime: $(uptime)" echo - log_info "Docker Status:" - docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" - echo - - log_info "Registry Status:" - if [ -d "/opt/registry" ]; then - cd /opt/registry - docker-compose ps - cd - > /dev/null + log_info "Harbor Status:" + if docker ps --format "table {{.Names}}\t{{.Status}}" | grep -q harbor; then + log_success "Harbor containers are running" + docker ps --format "table {{.Names}}\t{{.Status}}" | grep harbor else - log_warning "Registry directory not found" + log_error "Harbor containers are not running" fi echo @@ -149,10 +144,10 @@ monitor_ci_cd() { # Registry health check log_info "Registry Health Check:" - if curl -s -f http://localhost:5000/v2/_catalog > /dev/null 2>&1; then - log_success "Registry is accessible" + if curl -s -f -k https://localhost/api/v2.0/health > /dev/null 2>&1; then + log_success "Harbor registry is accessible" else - log_error "Registry is not accessible" + log_error "Harbor registry is not accessible" fi }