A production-grade NGINX Management & Monitoring Application enhanced with AI-driven intelligence for anomaly detection and root cause analysis.
The system consists of four primary components (see docs/ARCHITECTURE.md for a deep dive):
- Agent (Go): Deployed alongside NGINX instances. It collects metrics, tails logs, and manages NGINX configuration/certificates. Supports automated self-updates.
- Gateway (Go): Central command and control server. It manages agent sessions, streams logs to the UI, and provides a gRPC API for the frontend.
- AI Engine (Python/Bytewax): Consumes telemetry from Kafka. It uses machine learning to detect anomalies and correlates logs for Root Cause Analysis (RCA).
- Frontend (Next.js): A modern web interface for managing the NGINX fleet, viewing real-time logs, and analyzing performance via AI-driven dashboards.
- Fleet Management: Manage multiple NGINX instances from a single dashboard.
- Real-time Observability: Live tailing of access and error logs via gRPC/SSE.
- AI Diagnostics: Automatic anomaly detection with associated Root Cause Analysis (RCA).
- Full-Stack OTel: Integrated OpenTelemetry pipeline for metrics and logs.
Deploy the complete Avika stack using Helm. Use the chart values only (no --set for image tags) so gateway and frontend use the configured images (e.g. latest):
make deploy
# or explicitly:
helm upgrade --install avika deploy/helm/avika -f deploy/helm/avika/values.yaml -n avika --create-namespaceSee deploy/helm/avika/README.md for why we avoid overriding image tags and how to pin a version when needed.
To run the complete infrastructure and background services:
cd deploy/docker
docker-compose up -dFor detailed instructions on configuration, ports, and external components, see deploy/docker/README.md.
The gateway serves agent binaries and deployment scripts. Install the agent on any VM with a single command:
curl -fsSL http://<GATEWAY_IP>:5021/updates/deploy-agent.sh | \
sudo UPDATE_SERVER="http://<GATEWAY_IP>:5021/updates" \
GATEWAY_SERVER="<GATEWAY_IP>:5020" bashExample (using Kubernetes ClusterIP):
curl -fsSL http://10.106.98.165:5021/updates/deploy-agent.sh | \
sudo UPDATE_SERVER="http://10.106.98.165:5021/updates" \
GATEWAY_SERVER="10.106.98.165:5020" bashAlternative (using environment variables):
export UPDATE_SERVER="http://<GATEWAY_IP>:5021/updates"
export GATEWAY_SERVER="<GATEWAY_IP>:5020"
curl -fsSL $UPDATE_SERVER/deploy-agent.sh | sudo -E bash- Detects system architecture (amd64/arm64)
- Downloads the agent binary with checksum verification
- Installs to
/usr/local/bin/avika-agent - Creates configuration at
/etc/avika/avika-agent.conf - Sets up and enables systemd service
- Starts the agent
# View status
sudo systemctl status avika-agent
# View logs
sudo journalctl -u avika-agent -f
# Restart
sudo systemctl restart avika-agentFor more details, see docs/AGENT_DEPLOYMENT.md.
- API Definitions: Located in
api/proto/agent.proto. - Frontend: Run
npm run devin thefrontenddirectory. - Agent: Run
go build -o agent ./cmd/agent.
Gateway integration tests require PostgreSQL. Use the Makefile defaults or set DB_DSN:
make setup-test-db # start Postgres (admin/testpassword, avika_test)
make test-integration # run gateway integration tests
make teardown-test-dbTo use your own database, set DB_DSN (or TEST_DB_DSN) when running:
DB_DSN="postgres://user:pass@host:5432/db?sslmode=disable" make test-integration
The Makefile defaults to postgres://admin:testpassword@localhost:5432/avika_test?sslmode=disable when neither is set.