Skip to content

Logging Servers

Comprehensive logging infrastructure for API requests, supplier calls, and system events.


Architecture Diagram

graph TB
    subgraph SOURCES["Log Sources"]
        API["7 API Servers"]
        HAPROXY["HAProxy"]
        SUPPLIERS["Supplier Proxies"]
        MAINDB["MainDB"]
    end

    subgraph LOG_SERVERS["Logging Infrastructure"]
        subgraph API_LOGS["API Logging"]
            APILOG["API-LogServer-VM<br/>10.32.8.152"]
            MONGOLOG1["MongoDB-API-Logs<br/>10.32.8.75<br/>162M documents"]
        end

        subgraph ELK_LOGS["ELK Stack"]
            ELK1["ELK-Proxy-Supplier<br/>10.32.8.84"]
            ELK2["ELK-HAProxy-Log<br/>10.32.8.132"]
        end

        subgraph GENERAL_LOGS["General Log Servers"]
            LOG1["LogServer-1<br/>10.32.8.140"]
            LOG2["LogServer-2-MainDB<br/>10.32.8.16"]
            LOG3["LogServer-3-Agoda<br/>10.32.8.88"]
        end

        subgraph SUPPLIER_LOGS["Supplier-Specific Logs"]
            EXPLOG["MongoDB-ExpediaLogs<br/>10.32.8.18"]
        end
    end

    API --> APILOG & MONGOLOG1
    HAPROXY --> ELK2
    SUPPLIERS --> ELK1 & LOG3 & EXPLOG
    MAINDB --> LOG2
    API --> LOG1

    style API_LOGS fill:#87CEEB
    style ELK_LOGS fill:#FFE4B5
    style GENERAL_LOGS fill:#90EE90
    style SUPPLIER_LOGS fill:#DDA0DD

Log Server Inventory

Server IP Address Type Purpose
API-LogServer-VM 10.32.8.152 VM Centralized API request logs
ELK-Proxy-Supplier 10.32.8.84 VM Supplier proxy call logs
ELK-HAProxy-Log 10.32.8.132 VM HAProxy access/error logs
LogServer-1 10.32.8.140 VM General application logs
LogServer-2-MainDB 10.32.8.16 VM MainDB transaction logs
LogServer-3-Agoda 10.32.8.88 VM Agoda-specific supplier logs
MongoDB-API-Logs 10.32.8.75 VM API logs in MongoDB (162M docs)
MongoDB-ExpediaLogs 10.32.8.18 VM Expedia supplier logs

Log Categories

graph LR
    subgraph API_CATEGORY["API Logs"]
        A1["Request/Response"]
        A2["Performance Metrics"]
        A3["Error Logs"]
    end

    subgraph SUPPLIER_CATEGORY["Supplier Logs"]
        S1["Agoda Logs"]
        S2["Expedia Logs"]
        S3["Other Supplier Logs"]
    end

    subgraph INFRA_CATEGORY["Infrastructure Logs"]
        I1["HAProxy Access"]
        I2["HAProxy Errors"]
        I3["Database Logs"]
    end

    style API_CATEGORY fill:#87CEEB
    style SUPPLIER_CATEGORY fill:#FFE4B5
    style INFRA_CATEGORY fill:#90EE90

Log Retention & Volume

Log Type Storage Retention Volume
API Request Logs MongoDB 90 days 162M+ documents
Supplier Logs ELK/MongoDB 30 days High
HAProxy Logs ELK 14 days Very High
Database Logs File System 30 days Medium

Log Flow

sequenceDiagram
    participant API as API Server
    participant LOG as Log Server
    participant MONGO as MongoDB
    participant ELK as ELK Stack

    API->>LOG: Send log entry
    LOG->>MONGO: Store in MongoDB
    LOG->>ELK: Index for search

    Note over MONGO: 162M+ documents
    Note over ELK: Full-text search

Last Updated: 2025-12-02