# azure/adx-mon architecture

> Architecture diagram of the GitHub repository azure/adx-mon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/azure/adx-mon
- Repository: https://github.com/azure/adx-mon

## Overview

##### Project Type and Purpose
- ADX-Mon is an observability platform focused on integrating metrics, logs, traces, and continuous profiling into a unified system.
- The platform is built on Azure Data Explorer (ADX) and uses Kusto Query Language (KQL) for processing telemetry data.
- It is designed to be highly scalable, cloud-native (with specific support for Kubernetes), and supports industry-standard interfaces like OTEL and Prometheus.

##### File Structure – Key Insights
- Multiple top-level directories like “alerter”, “collector”, “ingestor”, “api”, “pkg”, “build”, and “tools” indicate a modular, microservices-like architecture:
- The “alerter” package handles alert evaluation, rule processing, and notification dispatching.
- The “collector” directory contains extensive support for collecting logs and metrics using different sources (journal, tail, etc.) and includes plugins for transforming data.
- The “ingestor” directory is responsible for data ingestion, processing telemetry, and interfacing with ADX.
- The “api” folder exposes custom resource definitions (CRDs) and API types for Kubernetes integration.
- The “pkg” directory contains supportive libraries (for HTTP services, logging, synchronization, Kubernetes helpers, OTLP, WAL, etc.).
- The “build” and “kustomize” folders include container build scripts and Kubernetes manifests, which highlight deployment in cloud-native environments.

##### Detail the Interactions and Data Flows
- From External Telemetry Sources → Collector (logs, metrics ingestion).
- From Collector → Ingestor (data normalization, batching, transformation).
- From ADX (or ADX data store) → Alerter (KQL queries and alert rule validations).
- From Alerter → Notification channels / External integrations.
- From “api” (Kubernetes CRDs) → Configuration/control plane that informs Alerter.
- That these components communicate via industry-standard APIs (OTEL, Prometheus, custom HTTP/REST services).

## Diagram (Mermaid)

```mermaid
flowchart TD
    A["External Telemetry Sources"]:::external

    subgraph "Data Collection Layer"
        C1["Collector Service"]:::collection
        C2["Collector Exec"]:::collection
        C1 --> C2
    end

    subgraph "Data Ingestion Layer"
        I1["Ingestor Service"]:::ingestion
        I2["Ingestor Exec"]:::ingestion
        I1 --> I2
    end

    D["Azure Data Explorer (ADX)"]:::adx

    subgraph "Alerting Layer"
        AL1["Alerter Service"]:::alert
        AL2["Alerter Exec"]:::alert
        AL1 --> AL2
    end

    F["External Notifications/Integrations"]:::external

    API["API (K8s CRDs)"]:::api
    CORE["Core Libraries & Utilities"]:::core

    subgraph "Deployment & Build Tools"
        DEPLOY["Build Tools"]:::deployment
        KUSTO["Kustomize"]:::deployment
    end

    %% Data flow connections
    A --> C1
    C2 --> I1
    I2 --> D
    D --> AL1
    AL2 --> F
    API --> AL1

    %% Support dependencies (dotted lines)
    CORE -.-> C1
    CORE -.-> I1
    CORE -.-> AL1
    CORE -.-> API

    DEPLOY -.-> C1
    DEPLOY -.-> I1
    DEPLOY -.-> AL1
    DEPLOY -.-> API

    KUSTO -.-> C1
    KUSTO -.-> I1
    KUSTO -.-> AL1
    KUSTO -.-> API

    %% Click Events for Component Mappings
    click C1 "https://github.com/azure/adx-mon/tree/main/collector/"
    click C2 "https://github.com/azure/adx-mon/tree/main/cmd/collector/"

    click I1 "https://github.com/azure/adx-mon/tree/main/ingestor/"
    click I2 "https://github.com/azure/adx-mon/tree/main/cmd/ingestor/"

    click AL1 "https://github.com/azure/adx-mon/tree/main/alerter/"
    click AL2 "https://github.com/azure/adx-mon/tree/main/cmd/alerter/"

    click API "https://github.com/azure/adx-mon/tree/main/api/v1/"

    click CORE "https://github.com/azure/adx-mon/tree/main/pkg/"

    click DEPLOY "https://github.com/azure/adx-mon/tree/main/build/"
    click KUSTO "https://github.com/azure/adx-mon/tree/main/kustomize/"

classDef external fill:#cce5ff,stroke:#333,stroke-width:2px;
classDef collection fill:#d4edda,stroke:#28a745,stroke-width:2px;
classDef ingestion fill:#fff3cd,stroke:#ffc107,stroke-width:2px;
classDef adx fill:#e6e6fa,stroke:#6f42c1,stroke-width:2px;
classDef alert fill:#f8d7da,stroke:#dc3545,stroke-width:2px;
classDef api fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
classDef core fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;
classDef deployment fill:#fefefe,stroke:#343a40,stroke-width:2px,stroke-dasharray: 5 5;
```
