AI-Powered Real-Time Event Detection & Kubernetes Observability
Keep your clusters caffeinated and your downtime minimized β
Coffybara is your friendly neighborhood capybara that never sleeps, keeping watch over your Kubernetes clusters 24/7. Like a capybara lounging peacefully by the water, Coffybara maintains zen like calmness while monitoring your infrastructure chaos.
The Problem: Kubernetes infrastructure often leads to unexpected downtime from sneaky anomalies like resource exhaustion and pod instability.
The Solution: Coffybara leverages advanced AI to predict and detect these anomalies in realtime, providing immediate, actionable insights directly to your development team through Slack and an intuitive dashboard.
- Semantic Analysis: Uses Pinecone vector database and Gemini AI for intelligent event contextualization
- Pattern Recognition: Learns from historical data to identify subtle anomalies before they become critical
- Smart Insights: Provides actionable recommendations based on similar past events
- Live Event Streaming: Kubernetes events streamed through Google Pub/Sub
- Instant Notifications: Realtime alerts via Socket.IO to dashboard and Slack
- Zero Latency: Immediate response to critical infrastructure events
- Rate Limiting: Redis-powered intelligent event throttling
- Deduplication: Eliminates noise from repetitive events
- Priority Scoring: Focuses on events that actually matter
- Responsive Design: Works seamlessly on desktop and mobile
- Realtime Updates: Live event feed with instant notifications
- Historical Analytics: Comprehensive event history and trend analysis
- Dark/Light Mode: Because we care about your eyes
- Slack Integration: Formatted alerts with context and recommendations
- Dashboard Alerts: Realtime notifications in the web interface
- Severity Levels: Color-coded alerts based on event criticality
- Kubernetes - Container orchestration
- Google Kubernetes Engine (GKE) - Managed Kubernetes
- Google Cloud Monitoring - Infrastructure monitoring
- Google Pub/Sub - Event streaming
- Cloud Run - Serverless container platform
- Redis - Caching and rate limiting
- Google Secrets Manager - Secure credential management
- Pinecone - Vector database for semantic search
- Gemini AI API - Intelligent event analysis
- Vector Embeddings - Semantic event similarity
- React 18 - Modern UI framework
- TypeScript - Typesafe development
- Vite - Lightning fast build tool
- Tailwind CSS - Utility first styling
- ShadCN - Beautiful component library
- Socket.IO Client - Realtime communication
- Node.js - Runtime environment
- Express - Web framework
- Socket.IO - Realtime websockets
- Axios - HTTP client
- Clerk - OAuth 2.0 authentication
- Google OAuth - Secure user management
- GitHub Actions - Automated workflows
- Vercel - Frontend deployment
- Docker - Containerization
- Vitest - Testing framework
- Node.js 18+
- Google Cloud Account with existing GKE cluster
- Google Cloud CLI (
gcloud
) installed and configured - Slack workspace (for notifications)
git clone https://github.com/oslabs-beta/capybara.git
cd coffybara
Coffybara uses Google Cloud Secrets Manager to securely store all configuration. No local .env
files needed!
Enable required APIs:
gcloud services enable secretmanager.googleapis.com
gcloud services enable pubsub.googleapis.com
gcloud services enable run.googleapis.com
gcloud services enable container.googleapis.com
Create secrets in Google Cloud Secrets Manager:
# Pinecone Configuration
gcloud secrets create pinecone-api-key --data-file=<(echo "your-pinecone-key")
gcloud secrets create pinecone-index-name --data-file=<(echo "your-index-name")
# Gemini AI
gcloud secrets create gemini-api-key --data-file=<(echo "your-gemini-key")
# Slack Integration
gcloud secrets create slack-bot-token --data-file=<(echo "your-slack-bot-token")
gcloud secrets create slack-channel --data-file=<(echo "your-channeltd")
# Redis (if using external Redis)
gcloud secrets create redis-url --data-file=<(echo "your-redis-url")
# Clerk Authentication
gcloud secrets create clerk-publishable-key --data-file=<(echo "your-clerk-key")
Coffybara automatically connects to your existing GKE clusters. Ensure your gcloud
CLI is authenticated and has access to your clusters:
# Authenticate with Google Cloud
gcloud auth login
# Set your project
gcloud config set project YOUR_PROJECT_ID
# Get cluster credentials (if needed)
gcloud container clusters get-credentials YOUR_CLUSTER_NAME --region=YOUR_REGION
From the root directory, simply run:
npm start
This single command will:
- Install dependencies for root, client, and server
- Start both the client and server concurrently
Alternative commands:
# Start only the server
npm run server
# Start only the client
npm run client
- Dashboard: http://localhost:5173
- API: http://localhost:3001
Coffybara automatically discovers and connects to your existing GKE clusters. The application will:
- Auto-detect clusters in your Google Cloud project
- Stream events from all accessible clusters via Google Pub/Sub
- Monitor pod lifecycle, resource usage, and system events
- Analyze events using AI and provide intelligent insights
Required Permissions: Ensure your Google Cloud service account has these IAM roles:
Kubernetes Engine Viewer
(to access cluster information)Pub/Sub Editor
(for event streaming)Secret Manager Secret Accessor
(to read configuration secrets)
Create the required Pub/Sub infrastructure:
# Create Pub/Sub topic for Kubernetes events
gcloud pubsub topics create kubernetes-events
# Create subscription for event processing
gcloud pubsub subscriptions create kubernetes-events-sub --topic=kubernetes-events
- Create a Slack app at https://api.slack.com/apps
- Add the
chat:write
bot scope - Install the app to your workspace
- Copy the Bot User OAuth Token to your
.env
π΄ Live Events: Realtime stream of Kubernetes events
π Analytics: Historical event trends and patterns
π― Filtered Views: Focus on specific namespaces or event types
π Search: Find specific events quickly
βοΈ Settings: Configure notification preferences
Coffybara sends intelligent Slack notifications with:
- Event Context: Pod, namespace, and timing information
- AI Analysis: Root cause analysis and recommendations
- Historical Context: Similar past events for reference
- Action Items: Specific steps to resolve the issue
// Get recent events
GET /api/events?limit=50&namespace=default
// Get event analytics
GET /api/analytics?timeRange=24h
// Health check
GET /api/health
// WebSocket connection
WS /socket.io
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
- Build the application:
npm run build
- Deploy to Cloud Run:
gcloud run deploy coffybara-backend \
--source=./server \
--platform=managed \
--region=us-central1 \
--allow-unauthenticated
- Deploy frontend to Vercel:
vercel --prod
Ensure all production environment variables are set in your deployment platform.
Team Member | GitHub | |
---|---|---|
Wenjun Song | ||
Steven Yeung | ||
Amit Haror |
- Better Documentation - Comprehensive setup guides and API documentation
- Custom Notifications - Alternative notification channel for critical alerts
- Historical Analytics - Enhanced data visualization and trend analysis
- Custom Alert Rules - User defined notification triggers and thresholds
- Multi Cluster Support - Monitor multiple Kubernetes clusters from one dashboard
- Resource Usage Insights - AI powered recommendations for cluster optimization
- Team Collaboration Features - Comments, incident assignments, and shared workspaces
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Capybaras for being the most chill animals and inspiring our mascot
- Google Cloud for providing robust infrastructure
- The Kubernetes Community for amazing orchestration tools
- Google for powerful AI capabilities
Found a bug? Have a feature request? We'd love to hear from you!
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Keep your clusters happy, keep your capybaras caffeinated!