{"id":24154873,"url":"https://github.com/lfmramos/tool-network-dashboard","last_synced_at":"2026-05-08T03:48:15.086Z","repository":{"id":271253763,"uuid":"912852518","full_name":"lfmramos/tool-network-dashboard","owner":"lfmramos","description":"Real-time network traffic analysis dashboard built with Python and Streamlit, enabling packet capture, protocol analysis, and interactive visualisation of network traffic patterns with thread-safe processing.","archived":false,"fork":false,"pushed_at":"2025-01-14T11:06:49.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T01:48:01.190Z","etag":null,"topics":["pandas","plotly","python","streamlit","threading"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lfmramos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-06T14:26:20.000Z","updated_at":"2025-01-14T11:06:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"165e5c81-e5af-4f8b-99f4-2efaa68a8b3f","html_url":"https://github.com/lfmramos/tool-network-dashboard","commit_stats":null,"previous_names":["lfmramos/tool-network-dashboard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lfmramos/tool-network-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfmramos%2Ftool-network-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfmramos%2Ftool-network-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfmramos%2Ftool-network-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfmramos%2Ftool-network-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfmramos","download_url":"https://codeload.github.com/lfmramos/tool-network-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfmramos%2Ftool-network-dashboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269067528,"owners_count":24354296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pandas","plotly","python","streamlit","threading"],"created_at":"2025-01-12T12:26:22.272Z","updated_at":"2025-10-12T18:24:26.086Z","avatar_url":"https://github.com/lfmramos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💻 Tech Stack: ![Python](https://img.shields.io/badge/python-3670A0?style=plastic\u0026logo=python\u0026logoColor=ffdd54) ![Pandas](https://img.shields.io/badge/pandas-%23150458.svg?style=plastic\u0026logo=pandas\u0026logoColor=white) ![Streamlit](https://img.shields.io/badge/Streamlit-FF4B4B?style=plastic\u0026logo=Streamlit\u0026logoColor=white) ![Plotly](https://img.shields.io/badge/Plotly-239120?style=plastic\u0026logo=plotly\u0026logoColor=white)\n\n![Front page of the \"Network Traffic Monitor\"](/screenshot.jpg)\n\n# Network Traffic Monitor\n\nA real-time network traffic analysis dashboard that provides visual insights into network traffic patterns. Built with Python and Streamlit, this application enables network packet capture, analysis, and real-time visualisation.\n\n## Background\n\nNetwork traffic analysis is crucial in enterprise environments where networks form the backbone of applications and services. This tool enables:\n- Real-time monitoring of network traffic (ingress and egress)\n- Packet capture and interpretation\n- Pattern identification and anomaly detection\n- Network security and efficiency monitoring\n\nThe application serves as a practical tool for network troubleshooting, performance optimisation, and security analysis in enterprise systems.\n\n## Tech Stack\n\n- **Python 3.8+**: Core programming language\n- **Streamlit**: Web application framework for data visualisation\n- **Scapy**: Network packet capture and manipulation\n- **Pandas**: Data manipulation and analysis\n- **Plotly**: Interactive data visualisation\n- **Threading**: Concurrent packet capture and processing\n\n## Features\n\n- Real-time packet capture and analysis\n- Interactive visualisation of protocol distribution\n- Live timeline of packet frequency\n- Protocol analysis (TCP, UDP, ICMP)\n- Source/destination IP tracking\n- Packet size monitoring\n- Auto-refreshing dashboard\n- Thread-safe packet processing\n- Modular code structure\n\n## Prerequisites\n\n- Python 3.8+\n- Administrator/root privileges (required for packet capture)\n- Basic understanding of computer networking concepts\n- Familiarity with TCP/IP protocols\n\n## Project Structure\n\n```\nnetwork-traffic-monitor/\n├── dashboard.py        # Main Streamlit dashboard interface\n├── packet_processor.py # Core packet capture and processing logic\n├── visualizations.py   # Data visualisation components\n├── config.py          # Logging and configuration settings\n└── requirements.txt\n```\n\n### Component Description\n\n- `dashboard.py`: Main application entry point and UI layout\n- `packet_processor.py`: Handles packet capture and processing with protocol mapping (TCP, UDP, ICMP)\n- `visualizations.py`: Creates and manages data visualisations (protocol distribution, packet timeline, top sources)\n- `config.py`: Contains application-wide configuration settings and logging setup\n\n## Installation\n\n1. Clone this repository:\n```bash\ngit clone https://github.com/yourusername/network-traffic-monitor\ncd network-traffic-monitor\n```\n\n2. Install the required packages:\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n1. Start the dashboard:\n```bash\n# Linux/MacOS\nsudo streamlit run dashboard.py\n\n# Windows (Run as Administrator)\nstreamlit run dashboard.py\n```\n\nNote: Administrator/root privileges are required for packet capture functionality.\n\n2. The dashboard provides:\n   - Total packet count\n   - Capture duration\n   - Protocol distribution pie chart\n   - Packets per second timeline\n   - Top source IP addresses bar chart\n   - Table of recent packets\n\n3. The dashboard automatically refreshes every 2 seconds, with an option for manual refresh.\n\n## Technical Details\n\n### Key Components\n\n- `PacketProcessor` (packet_processor.py):\n  - Thread-safe packet capture and storage\n  - Protocol mapping (TCP, UDP, ICMP)\n  - Packet metadata extraction\n  - Data management with size limiting (max 10,000 packets)\n\n- Visualisation Module (visualizations.py):\n  - Protocol distribution charts\n  - Packet timeline graphs\n  - Source IP analysis\n  - Real-time data visualisation updates\n\n- Dashboard Interface (dashboard.py):\n  - Streamlit-based user interface\n  - Real-time metrics display\n  - Auto-refresh functionality\n  - Recent packet display\n\n### Architecture\n\n- Modular design with separation of concerns\n- Multi-threaded packet capture for non-blocking operation\n- Thread-safe operations with proper locking mechanisms\n- Memory-efficient storage with rolling window\n- Centralised configuration and logging\n- Session state management for persistent capture\n\n## Security Considerations\n\n- Requires root/administrator privileges for packet capture\n- Only captures packet metadata (headers) - no payload inspection\n- Local processing only - no external data transmission\n- Thread-safe data handling\n\n## Limitations\n\n- Maximum storage of 10,000 packets in memory\n- Requires elevated privileges\n- Limited to IP-based protocols (TCP, UDP, ICMP)\n- Single-threaded packet processing\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Licence\n\n[MIT Licence](LICENCE)\n\n## Acknowledgements\n\n- Built with [Streamlit](https://streamlit.io/)\n- Packet capture powered by [Scapy](https://scapy.net/)\n- Visualisations using [Plotly](https://plotly.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfmramos%2Ftool-network-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfmramos%2Ftool-network-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfmramos%2Ftool-network-dashboard/lists"}