# n4v33nb0s3/custom-mrt-tool architecture

> Architecture diagram of the GitHub repository n4v33nb0s3/custom-mrt-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/n4v33nb0s3/custom-mrt-tool
- Repository: https://github.com/n4v33nb0s3/custom-mrt-tool

## Overview

Custom MTR is a small, single-file IPv4 reachability monitor. Its workflow loads and validates an IP list, starts one monitoring thread per address, probes with the OS ping utility, tracks three-failure reachability transitions and downtime, logs changes, and renders a live curses dashboard. All runtime components are implemented in Custom_MTR.py; the README documents these capabilities. Relationships shown below are grounded in the sampled source and README.

Main entry points: [`Custom_MTR.py`](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py) (Program Setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_monitoring["Monitoring"]
  node_main["Program Setup<br/>[Custom_MTR.py]"]
  node_ip_validation["IPv4 Validation<br/>[Custom_MTR.py]"]
  node_monitor_threads["Per-IP Monitor Threads<br/>[Custom_MTR.py]"]
  node_ping["Ping Probe<br/>[Custom_MTR.py]"]
  node_transition_tracking["State and Downtime Tracking<br/>[Custom_MTR.py]"]
  node_shared_status["Shared Status<br/>[Custom_MTR.py]"]
  node_status_log["Status Change Log<br/>[Custom_MTR.py]"]
end

subgraph group_interface["Terminal Interface"]
  node_dashboard["Curses Dashboard<br/>[Custom_MTR.py]"]
end

node_operator(("Network Operator"))
node_ip_file["IP List File"]
node_terminal["Terminal Display"]
node_network_devices(("IPv4 Network Devices"))
node_ping_utility["OS ping Utility"]

node_operator -->|"starts"| node_main
node_ip_file -->|"provides addresses"| node_main
node_main -->|"validates via"| node_ip_validation
node_main -->|"starts per IP"| node_monitor_threads
node_monitor_threads -->|"probes via"| node_ping
node_ping -->|"invokes"| node_ping_utility
node_ping_utility -.->|"pings"| node_network_devices
node_monitor_threads -->|"updates"| node_transition_tracking
node_transition_tracking -->|"writes state"| node_shared_status
node_transition_tracking -->|"logs changes"| node_status_log
node_main -->|"runs"| node_dashboard
node_dashboard -->|"reads"| node_shared_status
node_dashboard -->|"renders"| node_terminal

click node_main "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"
click node_ip_validation "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"
click node_monitor_threads "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"
click node_ping "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"
click node_transition_tracking "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"
click node_shared_status "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"
click node_status_log "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"
click node_dashboard "https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_ip_validation,node_monitor_threads,node_ping,node_transition_tracking,node_shared_status,node_status_log toneBlue
class node_dashboard toneAmber
class node_operator,node_ip_file,node_terminal,node_network_devices,node_ping_utility toneIndigo
```

## Components

### Monitoring

- [Program Setup](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`
- [IPv4 Validation](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`
- [Per-IP Monitor Threads](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`
- [Ping Probe](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`
- [State and Downtime Tracking](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`
- [Shared Status](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`
- [Status Change Log](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`

### Terminal Interface

- [Curses Dashboard](https://github.com/n4v33nb0s3/custom-mrt-tool/blob/main/Custom_MTR.py): `Custom_MTR.py`

### Other components

- **Network Operator**
- **IP List File**
- **Terminal Display**
- **IPv4 Network Devices**
- **OS ping Utility**

## Connections

- Network Operator → Program Setup: starts (evidence: `README.md`)
- IP List File → Program Setup: provides addresses (evidence: `Custom_MTR.py`)
- Program Setup → IPv4 Validation: validates via (evidence: `Custom_MTR.py`)
- Program Setup → Per-IP Monitor Threads: starts per IP (evidence: `Custom_MTR.py`)
- Per-IP Monitor Threads → Ping Probe: probes via (evidence: `Custom_MTR.py`)
- Ping Probe → OS ping Utility: invokes (evidence: `Custom_MTR.py`)
- OS ping Utility → IPv4 Network Devices: pings
- Per-IP Monitor Threads → State and Downtime Tracking: updates (evidence: `Custom_MTR.py`)
- State and Downtime Tracking → Shared Status: writes state (evidence: `Custom_MTR.py`)
- State and Downtime Tracking → Status Change Log: logs changes (evidence: `Custom_MTR.py`)
- Program Setup → Curses Dashboard: runs (evidence: `Custom_MTR.py`)
- Curses Dashboard → Shared Status: reads (evidence: `Custom_MTR.py`)
- Curses Dashboard → Terminal Display: renders (evidence: `Custom_MTR.py`)
