# wooseok22/rds-enhanced-exporter architecture

> Architecture diagram of the GitHub repository wooseok22/rds-enhanced-exporter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wooseok22/rds-enhanced-exporter
- Repository: https://github.com/wooseok22/rds-enhanced-exporter

## Overview

##### Main Components Identification

The project is a Go-based AWS monitoring tool with these key components:
- Scraper Module (scraper/)
- Parser Module (parser/)
- Exporter Module (exporter/)
- Configuration Management (config/)
- Logging System (log/)
- Common Utilities (common/)

##### Component Relationships

- Scraper → AWS CloudWatch (using queryStart API)
- Parser → Scraper (processes scraped data)
- Exporter → Parser (transforms parsed data into metrics)
- All Components → Configuration Manager (for settings)
- All Components → Logging System (for logging)

##### Specific Implementation Details

a) Pull Mode:
- External systems → Scraper → Parser → Exporter → Prometheus
- 'port' configuration for metrics endpoint

b) Push Mode:
- External systems → Scraper → Parser → Exporter → TSDB
- 'tsdburl' configuration

##### Configuration Aspects

Configuration elements:
- AWS ARN and Region
- Scraping intervals
- Authentication details

##### Notes about limitations and requirements

Remember to maintain clarity while showing the complexity of the AWS integration and the dual-mode (push/pull) capability of the system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph External
        CW[AWS CloudWatch Logs]:::aws
        RDS[AWS RDS Instances]:::aws
        TSDB[Time Series Database]:::external
        Prom[Prometheus]:::external
    end

    subgraph Core["Core Components"]
        direction TB
        App[Application Entry Point]:::core
        CLI[Command Line Interface]:::core
        
        subgraph Components
            direction TB
            Scraper[Scraper Module]:::component
            Parser[Parser Module]:::component
            Exporter[Exporter Module]:::component
        end
        
        subgraph Support["Support Systems"]
            direction TB
            Config[Configuration Manager]:::support
            Logger[Logging System]:::support
            Common[Common Utilities]:::support
        end
    end

    %% External Connections
    CW --> |queryStart API| Scraper
    RDS --> |Enhanced Monitoring| CW
    Exporter --> |Push Mode| TSDB
    Exporter --> |Pull Mode| Prom

    %% Internal Connections
    App --> CLI
    CLI --> Config
    Scraper --> |Raw Data| Parser
    Parser --> |Processed Data| Exporter
    
    %% Support System Connections
    Config -.-> Components
    Logger -.-> Components
    Common -.-> Components

    %% Click Events
    click Scraper "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/scraper/scraper.go"
    click Parser "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/parser/parser.go"
    click Exporter "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/exporter/exporter.go"
    click Config "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/config/config.go"
    click Logger "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/log/init.go"
    click Common "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/common/aws_util.go"
    click App "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/rds-enhanced-exporter.go"
    click CLI "https://github.com/wooseok22/rds-enhanced-exporter/blob/main/cmd/root.go"

    %% Styles
    classDef aws fill:#90EE90,stroke:#333,stroke-width:2px
    classDef external fill:#FFE4B5,stroke:#333,stroke-width:2px
    classDef component fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef support fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef core fill:#B0C4DE,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        direction TB
        AWS[AWS Services]:::aws
        EXT[External Systems]:::external
        COMP[Core Components]:::component
        SUP[Support Systems]:::support
        CORE[Core Application]:::core
    end
```
