Update monitor script for Harbor
This commit is contained in:
parent
7e64571ae3
commit
faf607b56c
1 changed files with 8 additions and 13 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue