## New Features ### Universal Instrumentation Container - Created deploy/instrumentation/ with Dockerfile that downloads OTel agents for: - .NET (glibc and musl/Alpine versions) - Node.js (with auto-instrumentation package) - Python (bootstrap script + requirements) - Java (javaagent JAR) - Go (example code for compile-time instrumentation) - PHP (composer package + init script) ### Universal instrument.sh Script - Auto-detects application language from running processes - Generates docker-compose snippets for each language - Supports: dotnet, nodejs, python, java, go, php - Usage: ./instrument.sh <container> [language] [otlp_endpoint] ### Improved docker-compose.yml - Added instrumentation init container with shared volume - Added AGENT_KEY environment variable for proper auth - Added ophion-agent service for host metrics collection - Named containers for easier management - Added ophion-network for service discovery ### Documentation - Created docs/QUICK_START.md with: - Single-command installation - Instrumentation guide for all languages - Troubleshooting section - Authentication guide ### Auth Fixes - Server now properly validates AGENT_KEY for agent authentication - OTel Collector configured with AGENT_KEY for forwarding to server - Fixed 401 errors when agents connect ## Files Changed - docker-compose.yml: Complete stack with all services - deploy/instrumentation/*: Universal OTel agent container - deploy/docker/otel-collector-config.yaml: Fixed auth headers - instrument.sh: Universal instrumentation script - docs/QUICK_START.md: Complete quick start guide - README.md: Updated with new features - .env.example: Added AGENT_KEY ## Testing - Go code compiles successfully - Docker images build correctly - All changes are backwards compatible
79 lines
5.5 KiB
Plaintext
79 lines
5.5 KiB
Plaintext
# ═══════════════════════════════════════════════════════════
|
|
# 🐍 OPHION - Configuração de Exemplo
|
|
# Copie para .env e preencha os valores
|
|
# ═══════════════════════════════════════════════════════════
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Organização
|
|
# ─────────────────────────────────────────────────────────────
|
|
ORG_NAME="Minha Empresa"
|
|
ADMIN_EMAIL=admin@empresa.com
|
|
ADMIN_PASSWORD=mude-esta-senha
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Rede
|
|
# ─────────────────────────────────────────────────────────────
|
|
DOMAIN=localhost
|
|
SERVER_PORT=8080
|
|
DASHBOARD_PORT=3000
|
|
API_URL=http://ophion-server:8080
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Segurança (GERE VALORES ÚNICOS!)
|
|
# Use: openssl rand -hex 32
|
|
# ─────────────────────────────────────────────────────────────
|
|
JWT_SECRET=MUDE-ISTO-openssl-rand-hex-32
|
|
API_KEY=ophion_MUDE-ISTO-openssl-rand-hex-32
|
|
|
|
# Agent Key - usado pelo ophion-agent e otel-collector
|
|
AGENT_KEY=ophion-secret-agent-key-2024
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# PostgreSQL
|
|
# ─────────────────────────────────────────────────────────────
|
|
POSTGRES_USER=ophion
|
|
POSTGRES_PASSWORD=MUDE-ISTO-senha-segura
|
|
POSTGRES_DB=ophion
|
|
DATABASE_URL=postgres://ophion:MUDE-ISTO-senha-segura@postgres:5432/ophion
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# ClickHouse
|
|
# ─────────────────────────────────────────────────────────────
|
|
CLICKHOUSE_URL=clickhouse://clickhouse:9000/ophion
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Redis
|
|
# ─────────────────────────────────────────────────────────────
|
|
REDIS_URL=redis://redis:6379
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Alertas - Telegram (opcional)
|
|
# ─────────────────────────────────────────────────────────────
|
|
TELEGRAM_ENABLED=false
|
|
TELEGRAM_BOT_TOKEN=
|
|
TELEGRAM_CHAT_ID=
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Alertas - Slack (opcional)
|
|
# ─────────────────────────────────────────────────────────────
|
|
SLACK_ENABLED=false
|
|
SLACK_WEBHOOK_URL=
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# IA - OpenAI (opcional, para recursos de IA)
|
|
# ─────────────────────────────────────────────────────────────
|
|
OPENAI_API_KEY=
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Configurações Gerais
|
|
# ─────────────────────────────────────────────────────────────
|
|
TZ=America/Sao_Paulo
|
|
LOG_LEVEL=info
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Retenção de Dados
|
|
# ─────────────────────────────────────────────────────────────
|
|
METRICS_RETENTION_DAYS=90
|
|
LOGS_RETENTION_DAYS=30
|
|
TRACES_RETENTION_DAYS=14
|