# dswijesooriya/network-telemetry-automation architecture

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

- Interactive diagram: https://gitdiagram.com/dswijesooriya/network-telemetry-automation
- Repository: https://github.com/dswijesooriya/network-telemetry-automation

## Overview

This repository is a beginner network-automation and telemetry lab. Its main user workflow runs the multi-router Python script, which connects to routers, retrieves command output, and writes local backup files; a simpler backup script demonstrates the same task for one router. Separately, the README documents SNMP-based monitoring through an exporter and Prometheus to Grafana. The topology and Prometheus configuration are present in the tree, but their contents were not sampled, so those links reflect README-level documentation rather than inspected configuration. The graph omits unrelated Python learning exercises.

Main entry points: [`multi_router.py`](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/multi_router.py) (Multi-Router Backup), [`backup.py`](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/backup.py) (Single-Router Backup), [`simple-lab.yml`](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/simple-lab.yml) (Containerlab Topology), [`router1_backup.txt`](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/router1_backup.txt) (Local Backup Files)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lab["Lab Infrastructure"]
  node_topology["Containerlab Topology<br/>[simple-lab.yml]"]
  node_router["Nokia SR Linux"]
end

subgraph group_automation["Backup Automation"]
  node_multi_backup["Multi-Router Backup<br/>[multi_router.py]"]
  node_single_backup["Single-Router Backup<br/>[backup.py]"]
  node_netmiko["Netmiko SSH"]
  node_backup_files["Local Backup Files<br/>[router1_backup.txt]"]
end

subgraph group_monitoring["Telemetry Monitoring"]
  node_snmp["SNMP Telemetry"]
  node_snmp_exporter["SNMP Exporter"]
  node_prometheus_config["Prometheus Config<br/>[prometheus.yml]"]
  node_prometheus[("Prometheus")]
  node_grafana["Grafana Dashboard"]
end

node_operator(("Network Engineer"))

node_operator -->|"deploys"| node_topology
node_topology -->|"hosts"| node_router
node_operator -->|"runs"| node_multi_backup
node_multi_backup -->|"connects via"| node_netmiko
node_multi_backup -->|"queries"| node_router
node_multi_backup -->|"writes"| node_backup_files
node_single_backup -->|"connects via"| node_netmiko
node_single_backup -->|"queries"| node_router
node_single_backup -->|"writes"| node_backup_files
node_router -->|"provides metrics"| node_snmp
node_snmp -->|"exports"| node_snmp_exporter
node_snmp_exporter -->|"scrapes into"| node_prometheus
node_prometheus_config -->|"configures"| node_prometheus
node_prometheus -->|"visualizes in"| node_grafana

click node_topology "https://github.com/dswijesooriya/network-telemetry-automation/blob/main/simple-lab.yml"
click node_multi_backup "https://github.com/dswijesooriya/network-telemetry-automation/blob/main/multi_router.py"
click node_single_backup "https://github.com/dswijesooriya/network-telemetry-automation/blob/main/backup.py"
click node_backup_files "https://github.com/dswijesooriya/network-telemetry-automation/blob/main/router1_backup.txt"
click node_prometheus_config "https://github.com/dswijesooriya/network-telemetry-automation/blob/main/prometheus.yml"

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_topology,node_router toneBlue
class node_multi_backup,node_single_backup,node_netmiko,node_backup_files toneAmber
class node_snmp,node_snmp_exporter,node_prometheus_config,node_prometheus,node_grafana toneMint
class node_operator toneIndigo
```

## Components

### Lab Infrastructure

- [Containerlab Topology](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/simple-lab.yml): `simple-lab.yml`
- **Nokia SR Linux**

### Backup Automation

- [Multi-Router Backup](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/multi_router.py): `multi_router.py`
- [Single-Router Backup](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/backup.py): `backup.py`
- **Netmiko SSH**
- [Local Backup Files](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/router1_backup.txt): `router1_backup.txt`

### Telemetry Monitoring

- **SNMP Telemetry**
- **SNMP Exporter**
- [Prometheus Config](https://github.com/dswijesooriya/network-telemetry-automation/blob/main/prometheus.yml): `prometheus.yml`
- **Prometheus**
- **Grafana Dashboard**

### Other components

- **Network Engineer**

## Connections

- Network Engineer → Containerlab Topology: deploys (evidence: `README.md`)
- Containerlab Topology → Nokia SR Linux: hosts (evidence: `README.md`)
- Network Engineer → Multi-Router Backup: runs (evidence: `README.md`)
- Multi-Router Backup → Netmiko SSH: connects via (evidence: `multi_router.py`)
- Multi-Router Backup → Nokia SR Linux: queries (evidence: `multi_router.py`)
- Multi-Router Backup → Local Backup Files: writes (evidence: `multi_router.py`)
- Single-Router Backup → Netmiko SSH: connects via (evidence: `backup.py`)
- Single-Router Backup → Nokia SR Linux: queries (evidence: `backup.py`)
- Single-Router Backup → Local Backup Files: writes (evidence: `backup.py`)
- Nokia SR Linux → SNMP Telemetry: provides metrics (evidence: `README.md`)
- SNMP Telemetry → SNMP Exporter: exports (evidence: `README.md`)
- SNMP Exporter → Prometheus: scrapes into (evidence: `README.md`)
- Prometheus Config → Prometheus: configures (evidence: `README.md`)
- Prometheus → Grafana Dashboard: visualizes in (evidence: `README.md`)
