Skip to content

It is an AI-driven cloud and log intelligence platform that analyzes system logs, detects anomalies, and visualizes security insights to help identify threats, suspicious activities, and cloud infrastructure vulnerabilities through an interactive dashboard.

Notifications You must be signed in to change notification settings

LoganthP/CloudSight-Analyzer

Repository files navigation

☁️ CloudSight-Analyzer – Intelligent Cloud Infrastructure Monitoring & Analysis

CloudSight-Analyzer is an AI-powered cloud infrastructure monitoring, optimization, and security analysis platform for multi-cloud environments.
Real-time visibility into AWS, Azure, GCP, and hybrid cloud deployments with predictive analytics and intelligent automation.


πŸ“š Table of Contents


πŸ”Ž Overview

Managing multi-cloud infrastructure is complex. Organizations struggle with:

  • Fragmented visibility across multiple cloud providers
  • Cost inefficiency due to unoptimized resources
  • Security blind spots from misconfigured services
  • Performance degradation without real-time monitoring
  • Compliance gaps across hybrid environments

CloudSight-Analyzer solves these challenges by providing a unified, intelligent platform that:

  • Aggregates metrics from AWS, Azure, and GCP in real-time
  • Uses machine learning to detect anomalies and optimization opportunities
  • Provides automated cost recommendations and compliance checking
  • Offers predictive insights for capacity planning
  • Enables proactive alerting and incident response

✨ Key Features

🌐 Multi-Cloud Integration

  • Native Support: AWS, Azure, Google Cloud Platform, hybrid deployments
  • Unified Dashboard: Single pane of glass for all cloud resources
  • Cross-Cloud Analytics: Correlate metrics across providers
  • API Abstraction: Unified API layer for heterogeneous cloud APIs

🧠 AI-Powered Analytics

  • Anomaly Detection: ML models identify unusual patterns in resource usage
  • Predictive Analytics: Forecast future resource demand and costs
  • Intelligent Alerting: Context-aware alerts reduce noise
  • Root Cause Analysis: AI-driven insights into performance issues

πŸ’° Cost Optimization

  • Real-Time Cost Tracking: Track spending across all cloud services
  • Right-Sizing Recommendations: Identify over/under-provisioned resources
  • Reserved Instance Optimization: Suggest best RIs/savings plans
  • Cost Anomaly Detection: Alert when spending deviates from baseline
  • Chargeback & Allocation: Attribute costs to business units/projects

πŸ” Security & Compliance

  • Misconfig Detection: Identify security group, IAM, and network issues
  • Compliance Scanning: Check against CIS, NIST, ISO 27001, PCI-DSS
  • Vulnerability Assessment: Detect exposed resources and weak policies
  • Audit Trail: Complete logging of all configurations and changes
  • Auto-Remediation: Automated fixes for common security issues

πŸ“Š Performance Monitoring

  • Real-Time Metrics: CPU, memory, disk, network from all cloud instances
  • Custom Dashboards: Build visualizations tailored to your needs
  • Distributed Tracing: Trace requests across microservices
  • Log Aggregation: Centralized logging from all cloud services
  • Alert Management: Configurable thresholds and escalation policies

⚑ Operational Intelligence

  • Resource Inventory: Comprehensive asset catalog across clouds
  • Dependency Mapping: Visualize relationships between resources
  • Capacity Planning: Forecast infrastructure needs
  • Scalability Analytics: Identify bottlenecks in auto-scaling groups
  • Patch Management: Track updates and compliance status

πŸ—οΈ Architecture

High-level architecture of CloudSight-Analyzer:

flowchart TD
    A[User Uploads Cloud Logs or Data] --> B[Frontend Dashboard Interface]
    
    B --> C[Input Validation Layer]
    C --> D[API Request to Backend]
    
    D --> E[Backend Server]
    E --> F[Data Preprocessing Module]
    
    F --> G[Cloud Analysis Engine]
    
    G --> H[Pattern Detection Module]
    G --> I[Anomaly Detection Module]
    G --> J[Statistical Analysis Module]
    
    H --> K[Insight Generation Engine]
    I --> K
    J --> K
    
    K --> L[Structured Analysis Results]
    
    L --> M[Database Storage]
    M --> N[Analysis Metadata Records]
    
    L --> O[JSON Response to Frontend]
    
    O --> P[Visualization Layer]
    P --> Q[Charts and Graphs]
    P --> R[Risk and Insight Panels]
    P --> S[Interactive Analytics Dashboard]
Loading

πŸ“ Project Structure

Clean, modular organization for CloudSight-Analyzer:

CloudSight-Analyzer/
β”œβ”€ README.md
β”œβ”€ LICENSE
β”œβ”€ requirements.txt
β”œβ”€ docker-compose.yml
β”œβ”€ Dockerfile
β”‚
β”œβ”€ cloudsight_analyzer/
β”‚  β”œβ”€ __init__.py
β”‚  β”œβ”€ config.py              # Configuration management
β”‚  β”œβ”€ utils/
β”‚  β”‚  β”œβ”€ logger.py
β”‚  β”‚  β”œβ”€ decorators.py
β”‚  β”‚  β”œβ”€ validators.py
β”‚  β”‚  └─ helpers.py
β”‚  β”‚
β”‚  β”œβ”€ cloud/
β”‚  β”‚  β”œβ”€ base.py             # Abstract cloud provider class
β”‚  β”‚  β”œβ”€ aws_provider.py      # AWS integration
β”‚  β”‚  β”œβ”€ azure_provider.py    # Azure integration
β”‚  β”‚  β”œβ”€ gcp_provider.py      # GCP integration
β”‚  β”‚  └─ provider_factory.py  # Factory pattern for providers
β”‚  β”‚
β”‚  β”œβ”€ collectors/
β”‚  β”‚  β”œβ”€ base_collector.py
β”‚  β”‚  β”œβ”€ metrics_collector.py # CPU, memory, disk, network
β”‚  β”‚  β”œβ”€ cost_collector.py    # Billing and cost data
β”‚  β”‚  β”œβ”€ security_collector.py # Security and compliance
β”‚  β”‚  └─ scheduler.py         # Orchestrate collections
β”‚  β”‚
β”‚  β”œβ”€ storage/
β”‚  β”‚  β”œβ”€ timeseries_db.py    # InfluxDB / Prometheus
β”‚  β”‚  β”œβ”€ document_db.py      # MongoDB for metadata
β”‚  β”‚  β”œβ”€ cache.py            # Redis caching
β”‚  β”‚  └─ migrations.py       # Database versioning
β”‚  β”‚
β”‚  β”œβ”€ analytics/
β”‚  β”‚  β”œβ”€ anomaly_detector.py # ML-based anomaly detection
β”‚  β”‚  β”œβ”€ cost_optimizer.py   # Cost analysis & recommendations
β”‚  β”‚  β”œβ”€ compliance_checker.py # CIS, NIST, ISO checks
β”‚  β”‚  β”œβ”€ predictor.py        # Time-series forecasting
β”‚  β”‚  └─ models/             # Pre-trained ML models (.pkl, .h5)
β”‚  β”‚
β”‚  β”œβ”€ api/
β”‚  β”‚  β”œβ”€ main.py             # FastAPI application
β”‚  β”‚  β”œβ”€ schemas.py          # Pydantic models
β”‚  β”‚  β”œβ”€ routes/
β”‚  β”‚  β”‚  β”œβ”€ clouds.py        # Cloud provider endpoints
β”‚  β”‚  β”‚  β”œβ”€ resources.py     # Resource management
β”‚  β”‚  β”‚  β”œβ”€ metrics.py       # Metrics & monitoring
β”‚  β”‚  β”‚  β”œβ”€ costs.py         # Cost analysis
β”‚  β”‚  β”‚  β”œβ”€ security.py      # Security & compliance
β”‚  β”‚  β”‚  β”œβ”€ alerts.py        # Alert management
β”‚  β”‚  β”‚  β”œβ”€ reports.py       # Report generation
β”‚  β”‚  β”‚  └─ health.py        # System health checks
β”‚  β”‚  β”‚
β”‚  β”‚  └─ auth/
β”‚  β”‚     β”œβ”€ jwt_handler.py
β”‚  β”‚     └─ permissions.py
β”‚  β”‚
β”‚  β”œβ”€ integrations/
β”‚  β”‚  β”œβ”€ slack_notifier.py
β”‚  β”‚  β”œβ”€ teams_notifier.py
β”‚  β”‚  β”œβ”€ email_sender.py
β”‚  β”‚  β”œβ”€ webhook_dispatcher.py
β”‚  β”‚  └─ siem_connector.py  # SIEM (Splunk, ELK) integration
β”‚  β”‚
β”‚  └─ dashboard/             # (Optional) Streamlit/React frontend
β”‚     └─ app.py
β”‚
β”œβ”€ tests/
β”‚  β”œβ”€ unit/
β”‚  β”‚  β”œβ”€ test_aws_provider.py
β”‚  β”‚  β”œβ”€ test_metrics_collector.py
β”‚  β”‚  β”œβ”€ test_anomaly_detector.py
β”‚  β”‚  └─ test_cost_optimizer.py
β”‚  β”‚
β”‚  └─ integration/
β”‚     └─ test_api_endpoints.py
β”‚
β”œβ”€ experiments/
β”‚  β”œβ”€ notebooks/             # Jupyter exploration
β”‚  β”‚  β”œβ”€ cost_analysis.ipynb
β”‚  β”‚  β”œβ”€ anomaly_tuning.ipynb
β”‚  β”‚  └─ compliance_audit.ipynb
β”‚  β”‚
β”‚  └─ results/               # Experiment reports
β”‚
└─ data/
   β”œβ”€ raw/                   # Raw cloud API responses (ignored)
   β”œβ”€ processed/             # Cleaned & enriched data
   └─ models/                # ML model artifacts

☁️ Supported Cloud Platforms

Amazon Web Services (AWS)

  • Services Monitored: EC2, RDS, S3, Lambda, DynamoDB, ECS, EKS, ALB/NLB, CloudFront, and 200+
  • Metrics: CPU, memory, disk I/O, network, application-specific
  • Cost: Track EC2, RDS, S3, Lambda, compute costs with detailed breakdowns
  • Security: IAM policies, security groups, VPC configuration, S3 bucket policies
  • Compliance: CIS AWS Foundations Benchmark, PCI-DSS, HIPAA, SOC 2

Microsoft Azure

  • Services Monitored: VMs, App Services, SQL Database, Cosmos DB, AKS, Functions, Storage
  • Metrics: CPU %, available memory, disk I/O, network throughput
  • Cost: Azure consumption-based billing analysis, reserved instance optimization
  • Security: Network security groups, IAM roles, encryption status, key vault audit
  • Compliance: CIS Azure Foundations, ISO 27001, NIST

Google Cloud Platform (GCP)

  • Services Monitored: Compute Engine, GKE, Cloud SQL, Firestore, Cloud Storage, Cloud Functions
  • Metrics: VM metrics via Monitoring API, application performance
  • Cost: BigQuery-based cost analysis, commitment discounts
  • Security: IAM bindings, VPC firewall rules, bucket ACLs
  • Compliance: CIS GCP Foundations, PCI-DSS, ISO compliance tracking

Hybrid & Multi-Cloud

  • On-Premises Integration: Connect physical servers and VMs
  • Cross-Cloud Analytics: Correlate metrics and costs across providers
  • Unified Billing: Single pane of glass for all infrastructure costs

πŸš€ Installation & Setup

Prerequisites

  • Python 3.9+
  • PostgreSQL 12+ or MongoDB for metadata storage
  • InfluxDB 2.0+ or Prometheus for time-series metrics
  • Redis 6.0+ for caching
  • Docker and Docker Compose (recommended)
  • Cloud provider credentials (AWS, Azure, GCP)

Option 1: Docker Installation (Recommended)

# Clone the repository
git clone https://github.com/LoganthP/CloudSight-Analyzer.git
cd CloudSight-Analyzer

# Create environment configuration
cp .env.example .env
# Edit .env with your cloud credentials and API keys

# Build and start all services
docker-compose up -d

# Verify services are running
docker-compose ps

# View logs
docker-compose logs -f cloudsight-api

# Access the application
# API: http://localhost:8000
# Swagger Docs: http://localhost:8000/docs
# Grafana Dashboard: http://localhost:3000 (admin/admin)

Option 2: Manual Installation

Backend Setup

# Clone repository
git clone https://github.com/LoganthP/CloudSight-Analyzer.git
cd CloudSight-Analyzer

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your configuration

# Start the API server
uvicorn cloudsight_analyzer.api.main:app --host 0.0.0.0 --port 8000 --reload
# API will be available at http://localhost:8000

Database Setup

# PostgreSQL for metadata
sudo apt-get install postgresql postgresql-contrib
createdb cloudsight_analyzer
createuser cloudsight_user --pwprompt

# InfluxDB for time-series metrics
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install influxdb2

# Redis for caching
sudo apt-get install redis-server

# Start services
sudo systemctl start postgresql influxdb redis-server

βš™οΈ Configuration

Environment Variables (.env)

# Application
APP_NAME=CloudSight-Analyzer
APP_ENV=production
DEBUG=False
SECRET_KEY=your-secret-key-here

# Database
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=cloudsight_user
POSTGRES_PASSWORD=your_password
POSTGRES_DB=cloudsight_analyzer

# Time-Series Database
INFLUXDB_URL=http://localhost:8086
INFLUXDB_ORG=CloudSight
INFLUXDB_BUCKET=cloud-metrics
INFLUXDB_TOKEN=your-influxdb-token

# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0

# AWS Configuration
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGIONS=us-east-1,us-west-2,eu-west-1

# Azure Configuration
AZURE_TENANT_ID=your_tenant_id
AZURE_CLIENT_ID=your_client_id
AZURE_CLIENT_SECRET=your_client_secret
AZURE_SUBSCRIPTION_ID=your_subscription_id

# GCP Configuration
GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
GCP_PROJECT_ID=your_project_id

# Notification Services
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password

# API Keys
EXTERNAL_API_KEY=your_api_key_for_third_party_services

# Collection Intervals (seconds)
METRICS_COLLECTION_INTERVAL=300  # 5 minutes
COST_COLLECTION_INTERVAL=3600    # 1 hour
SECURITY_SCAN_INTERVAL=86400     # 24 hours

Cloud Provider Configuration

AWS

# IAM Policy required for CloudSight-Analyzer
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:Describe*",
        "rds:Describe*",
        "s3:ListBucket",
        "s3:GetBucketPolicy",
        "ce:GetCostAndUsage",
        "cloudwatch:GetMetricStatistics",
        "iam:Get*",
        "iam:List*"
      ],
      "Resource": "*"
    }
  ]
}

Azure

# Required roles
az role assignment create --assignee <app-id> \
  --role "Monitoring Reader" \
  --scope /subscriptions/<subscription-id>

GCP

# Service account permissions
gcloud projects add-iam-policy-binding <project-id> \
  --member=serviceAccount:<service-account@project.iam.gserviceaccount.com> \
  --role=roles/monitoring.viewer

πŸ“– Usage Guide

1. Register Cloud Provider

curl -X POST "http://localhost:8000/api/v1/clouds" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "provider": "aws",
    "name": "Production AWS",
    "credentials": {
      "access_key_id": "AKIA...",
      "secret_access_key": "..."
    },
    "regions": ["us-east-1", "eu-west-1"]
  }'

2. Fetch Real-Time Metrics

from cloudsight_analyzer.api.client import CloudSightClient

client = CloudSightClient(api_url="http://localhost:8000", api_key="your_api_key")

# Get EC2 instance metrics
metrics = client.get_metrics(
    cloud_provider="aws",
    resource_type="ec2",
    time_range=("2025-11-01", "2025-11-30"),
    aggregation="hourly"
)
print(metrics)

3. Cost Analysis

curl "http://localhost:8000/api/v1/costs/analysis" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "cloud": "aws",
    "start_date": "2025-11-01",
    "end_date": "2025-11-30",
    "group_by": "service"
  }'

4. Security Compliance Check

curl "http://localhost:8000/api/v1/security/scan" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -X POST \
  -d '{
    "cloud": "azure",
    "framework": "cis",
    "severity": "high"
  }'

5. Generate Reports

curl "http://localhost:8000/api/v1/reports/generate" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -X POST \
  -d '{
    "report_type": "executive_summary",
    "period": "monthly",
    "include_sections": ["costs", "security", "performance"]
  }' \
  -o report.pdf

πŸ“Š API Endpoints

Method Endpoint Description
GET /api/v1/clouds List configured clouds
POST /api/v1/clouds Register new cloud provider
GET /api/v1/clouds/{id}/resources List cloud resources
GET /api/v1/metrics Fetch time-series metrics
POST /api/v1/metrics/search Advanced metric search
GET /api/v1/costs/summary Cost overview
GET /api/v1/costs/recommendations Optimization recommendations
POST /api/v1/security/scan Run security scan
GET /api/v1/compliance/status Compliance status
POST /api/v1/alerts/configure Set up alerts
GET /api/v1/reports/list List available reports
POST /api/v1/reports/generate Generate custom report
GET /api/v1/health System health check

πŸ“Š Monitoring Dashboards

Grafana Integration

CloudSight-Analyzer includes pre-built Grafana dashboards:

  • Cloud Overview: High-level metrics from all providers
  • Cost Analytics: Spending trends, forecasting, recommendations
  • Security Posture: Compliance status, vulnerabilities, misconfigurations
  • Performance Metrics: CPU, memory, disk, network utilization
  • Capacity Planning: Resource forecasts and trends

Custom Dashboards

# Access Grafana
http://localhost:3000

# Default credentials
username: admin
password: admin

# Import CloudSight dashboards from:
/grafana/dashboards/

πŸ“ˆ Analytics & Reporting

Available Reports

  1. Executive Summary

    • High-level KPIs
    • Cost overview and trends
    • Security posture
    • Top recommendations
  2. Cost Analysis

    • Detailed cost breakdown by service
    • Month-over-month comparison
    • Right-sizing opportunities
    • Reserved instance savings
  3. Security & Compliance

    • Compliance status against frameworks
    • Vulnerabilities and misconfigurations
    • Remediation status
    • Audit trail
  4. Performance Report

    • Resource utilization metrics
    • Bottleneck identification
    • Scalability analysis
    • Recommendations

⚑ Performance Optimization

Scaling Considerations

# docker-compose.yml - Production configuration
version: '3.9'
services:
  cloudsight-api:
    image: cloudsight-analyzer:latest
    deploy:
      replicas: 3
      resources:
        limits:
          cpus: '2'
          memory: 4G
    environment:
      - WORKERS=4
      - DATABASE_POOL_SIZE=20

  influxdb:
    image: influxdb:2.7
    volumes:
      - influxdb-storage:/var/lib/influxdb2
    environment:
      - INFLUXDB_DB_RETENTION=30d

  postgres:
    image: postgres:15-alpine
    environment:
      - POSTGRES_MAX_CONNECTIONS=200

  redis:
    image: redis:7-alpine
    command: redis-server --maxmemory 2gb --maxmemory-policy allkeys-lru

Query Optimization

  • Caching: Redis caches frequently accessed metrics
  • Batch Processing: Bulk inserts for time-series data
  • Index Strategy: Optimized database indexes for common queries
  • Aggregation: Pre-computed hourly/daily summaries

πŸ›€οΈ Roadmap

  • Multi-cloud data collection
  • Real-time metrics aggregation
  • Cost analysis & optimization
  • Security compliance scanning
  • REST API & authentication
  • ML-based anomaly detection (advanced)
  • Predictive capacity planning
  • Auto-remediation for common issues
  • Mobile application
  • Terraform/IaC integration
  • Kubernetes cluster monitoring
  • FinOps automation

🀝 Contributing

  1. Fork & branch: git checkout -b feature/your-feature
  2. Code with style: Follow PEP8, add type hints, docstrings
  3. Add tests: pytest tests/
  4. Commit: Clear, descriptive messages
  5. Push & PR: Reference issues, add screenshots

GitHub stars GitHub forks

Made with ☁️ for Multi-Cloud Intelligence

↑ Back to Top

About

It is an AI-driven cloud and log intelligence platform that analyzes system logs, detects anomalies, and visualizes security insights to help identify threats, suspicious activities, and cloud infrastructure vulnerabilities through an interactive dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages