Skip to content

Commit 96693d0

Browse files
committed
fix: detect production vs development Redpanda container for metrics command
1 parent e623055 commit 96693d0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ metrics: ## Show comprehensive metrics from all services
141141
@curl -s http://localhost:8002/metrics 2>/dev/null | python3 -m json.tool || echo "❌ Metrics unavailable"
142142
@echo ""
143143
@echo "📡 Kafka Consumer Lag:"
144-
@docker exec dispatchai-redpanda rpk group describe dispatchai-classifier 2>/dev/null || echo "❌ Consumer group not found"
144+
@if docker ps --format "{{.Names}}" | grep -q "dispatchai-redpanda-prod"; then \
145+
docker exec dispatchai-redpanda-prod rpk group describe dispatchai-classifier 2>/dev/null || echo "❌ Consumer group not found"; \
146+
else \
147+
docker exec dispatchai-redpanda rpk group describe dispatchai-classifier 2>/dev/null || echo "❌ Consumer group not found"; \
148+
fi
145149
@echo ""
146150

147151
metrics-ingress: ## Show metrics for ingress service

0 commit comments

Comments
 (0)