# door7302/openjts architecture

> Architecture diagram of the GitHub repository door7302/openjts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/door7302/openjts
- Repository: https://github.com/door7302/openjts

## Overview

##### Main Components

a) Core Services Layer:
- JTSO (JTS Orchestrator) - Written in Go
- Telegraf (Custom Juniper build)
- InfluxDB (Time Series Database)
- Kapacitor (Aggregation and Alerting)
- Grafana (Visualization)

b) Data Collection Layer:
- Juniper Routing Devices (PTX 10K, MX, ACX 7K)
- gRPC/gNMI Telemetry collectors
- NETCONF collectors

c) Profile Management:
- Pre-configured monitoring profiles (bgp, health, power, traffic, etc.)
- Profile deployment system

**[Device Layer]**
- ↓ gRPC/gNMI/NETCONF
**[Collection Layer]**
- ↓ Data Flow
**[Processing Layer]**
- ↓ Storage/Analysis
**[Visualization Layer]**

##### Component Relationships

- Juniper devices → Telegraf (data collection)
- Telegraf → InfluxDB (data storage)
- InfluxDB → Kapacitor (aggregation/alerting)
- InfluxDB → Grafana (visualization)
- JTSO → All components (orchestration)

For each component, show:
- Component name
- Primary function
- Key interfaces
- Associated configuration files
- Data flow direction

##### Additional Elements

Include:
- Version compatibility notes (Junos/EVO 20.1+)
- Profile deployment workflow
- Security certificate paths
- Configuration file locations

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Device_Layer
        PTX["PTX 10K Router"]:::device
        MX["MX Router"]:::device
        ACX["ACX 7K Router"]:::device
    end

    subgraph Collection_Layer
        Telegraf["Telegraf Collector"]:::collector
        click Telegraf "https://github.com/door7302/openjts/tree/main/compose/telegraf/"
        TelegrafPTX["PTX Config"]:::config
        click TelegrafPTX "https://github.com/door7302/openjts/blob/main/compose/telegraf/ptx/telegraf.conf"
        TelegrafMX["MX Config"]:::config
        click TelegrafMX "https://github.com/door7302/openjts/blob/main/compose/telegraf/mx/telegraf.conf"
        TelegrafACX["ACX Config"]:::config
        click TelegrafACX "https://github.com/door7302/openjts/blob/main/compose/telegraf/acx/telegraf.conf"
    end

    subgraph Processing_Layer
        InfluxDB["InfluxDB"]:::database
        click InfluxDB "https://github.com/door7302/openjts/tree/main/compose/influxdb/"
        Kapacitor["Kapacitor"]:::processor
        click Kapacitor "https://github.com/door7302/openjts/tree/main/compose/kapacitor/"
    end

    subgraph Visualization_Layer
        Grafana["Grafana"]:::visualization
        click Grafana "https://github.com/door7302/openjts/tree/main/compose/grafana/"
        Dashboards["Dashboards"]:::config
        click Dashboards "https://github.com/door7302/openjts/tree/main/compose/grafana/data/dashboards/"
    end

    subgraph Orchestration
        JTSO["JTSO\n(JTS Orchestrator)"]:::orchestrator
        click JTSO "https://github.com/door7302/openjts/tree/main/compose/jtso/"
        Profiles["Profile Management"]:::config
        click Profiles "https://github.com/door7302/openjts/tree/main/design_profile/"
        
        subgraph Profile_Types
            BGP["BGP Profile"]:::profile
            click BGP "https://github.com/door7302/openjts/tree/main/design_profile/bgp/"
            Health["Health Profile"]:::profile
            click Health "https://github.com/door7302/openjts/tree/main/design_profile/health/"
            Power["Power Profile"]:::profile
            click Power "https://github.com/door7302/openjts/tree/main/design_profile/power/"
            Traffic["Traffic Profile"]:::profile
            click Traffic "https://github.com/door7302/openjts/tree/main/design_profile/traffic/"
        end
    end

    %% Connections
    PTX --> |gRPC/gNMI| Telegraf
    MX --> |gRPC/gNMI| Telegraf
    ACX --> |gRPC/gNMI| Telegraf
    
    Telegraf --> TelegrafPTX
    Telegraf --> TelegrafMX
    Telegraf --> TelegrafACX
    
    Telegraf --> InfluxDB
    InfluxDB --> Kapacitor
    InfluxDB --> Grafana
    Grafana --> Dashboards
    
    JTSO --> Profiles
    Profiles --> Profile_Types
    JTSO --> Telegraf
    JTSO --> InfluxDB
    JTSO --> Kapacitor
    JTSO --> Grafana

    %% Styles
    classDef device fill:#gray,stroke:#333,stroke-width:2px
    classDef collector fill:#3498db,stroke:#2980b9,stroke-width:2px
    classDef database fill:#e74c3c,stroke:#c0392b,stroke-width:2px
    classDef processor fill:#2ecc71,stroke:#27ae60,stroke-width:2px
    classDef visualization fill:#9b59b6,stroke:#8e44ad,stroke-width:2px
    classDef orchestrator fill:#f1c40f,stroke:#f39c12,stroke-width:2px
    classDef config fill:#95a5a6,stroke:#7f8c8d,stroke-width:2px
    classDef profile fill:#e67e22,stroke:#d35400,stroke-width:2px
```
