Skip to main content

A beautiful network monitoring tool with console and web interface

Project description

NetWatch - Professional Network Monitor ๐ŸŒ

An elegant network monitoring tool with modern console and web interfaces, designed with a professional pastel color palette.

โœจ Features

๐Ÿ–ฅ๏ธ Console Interface

  • ๐ŸŽฏ Interface Selection: Choose specific interfaces or monitor all
  • ๐Ÿ“Š Real-time Traffic: Live monitoring of sent/received bytes per second
  • ๐Ÿ“ˆ Cumulative Statistics: Total bytes sent and received
  • ๐ŸŽจ ASCII Graphs: Colorful real-time traffic history graphs
  • ๐ŸŒˆ Colorful Interface: Rich terminal colors with emojis and visual elements

๐ŸŒ Web Interface

  • ๐ŸŽจ Professional Pastel Palette: Modern design with soft and elegant colors
  • ๐Ÿ“ฑ Responsive: Perfectly adapted for mobile and desktop
  • ๐Ÿ“Š Interactive Charts: Advanced visualization with Chart.js
  • ๐Ÿ”„ Real-time Data: Automatic updates without simulations
  • ๐Ÿšซ No Fake Data: Shows disconnected state when no real data is available
  • ๐ŸŽฏ REST API: Endpoints for integration with other systems

๐Ÿ”ง Technical Features

  • ๐Ÿ”„ Cross-platform: Works on Windows, Linux and macOS
  • โšก Easy Installation: Simple pip installation
  • ๐Ÿ Python 3.7+: Support for modern Python versions
  • ๐Ÿ“ฆ Professional Packaging: Ready for distribution

๐Ÿš€ Installation

Method 1: Install from PyPI (Recommended)

pip install netwatch-monitor

Method 2: Install from Source

  1. Clone the repository:
git clone https://github.com/PC0staS/netwatch.git
cd netwatch
  1. Install in development mode:
pip install -e .

๐ŸŽฎ Usage

๐Ÿ–ฅ๏ธ Console Interface

After installation, simply run:

netwatch

The tool will:

  1. Show all available network interfaces
  2. Let you select which interfaces to monitor:
    • 0 - Monitor ALL interfaces
    • 1,2,3 - Monitor specific interfaces (comma-separated)
  3. Start real-time monitoring with ASCII graphs

๐ŸŒ Web Interface

To start the web interface:

netwatch-web

For network access (accessible from other devices on your local network):

netwatch-web --network

Or with custom options:

netwatch-web --host 0.0.0.0 --port 8080 --debug

Alternative method using main command:

netwatch --web --network --port 8080

Then open your browser at http://localhost:5000 (or the port you specify).

For network access: Use your computer's IP address from other devices, e.g., http://192.168.1.100:5000

Web Interface Features:

  • ๐ŸŽจ Professional Pastel Palette: Soft and elegant colors
  • ๐Ÿ“ฑ Responsive Design: Works perfectly on mobile devices
  • ๐Ÿ“Š Interactive Charts: Advanced data visualization
  • ๐Ÿ”„ Real-time Updates: Automatic refresh every 2 seconds
  • ๐Ÿšซ No Simulated Data: Shows disconnected state when no data available
  • ๐ŸŽฏ Intuitive Controls: Easy interface selection and monitoring control

Example Usage - Console

$ netwatch

๐ŸŒ NetWatch - Network Monitor
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
๐Ÿš€ Starting network monitoring...
๐Ÿ“Š Gathering interface data...

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
๐ŸŒ AVAILABLE NETWORK INTERFACES
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

1. Ethernet
2. Wi-Fi
3. Loopback

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
๐ŸŽฏ SELECTION OPTIONS:
0 - Monitor ALL interfaces
1,2,3 - Monitor specific interfaces (comma-separated)
Example: '1,3' to monitor interfaces 1 and 3
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ” Enter your selection: 1

โœ… Selected interfaces:
   - Ethernet

๐Ÿ”„ Monitoring started for 1 interface(s)
โฑ๏ธ  Updates every second - Press Ctrl+C to stop

๐Ÿ“Š Interface Display

For each selected interface, you'll see:

  • Real-time Traffic: Current bytes per second (sent/received)
  • Cumulative Traffic: Total bytes since monitoring started
  • ASCII Graphs: Beautiful colored graphs showing traffic history
  • Visual Elements: Emojis, colors, and borders for better readability

๐ŸŽจ Features Details

ASCII Graphs

  • Width: 65 characters wide
  • Height: 6 rows of data
  • Colors: Different color schemes for sent (blue) and received (green) traffic
  • Intensity: Multiple intensity levels based on traffic volume
  • Scale: Automatic scaling with max value display

Web Interface Color Palette

  • Primary: Soft purple (#8B7EC8)
  • Secondary: Mint green (#A8D5BA)
  • Accent: Soft pink (#FFB6C1)
  • Success: Aqua mint (#98E4D6)
  • Warning: Soft yellow (#F4D03F)
  • Danger: Soft coral (#F1948A)

๐Ÿ› ๏ธ Requirements

  • Python 3.7+
  • psutil (automatically installed)
  • Flask & Flask-SocketIO (for web interface)
  • Works on Windows, Linux, and macOS
  • Terminal with ANSI color support (most modern terminals)

๐Ÿ”ง Development

Project Structure

netwatch/
โ”œโ”€โ”€ netwatch/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ monitor.py      # Core monitoring logic
โ”‚   โ”œโ”€โ”€ cli.py          # Command line interface
โ”‚   โ”œโ”€โ”€ web.py          # Web interface
โ”‚   โ”œโ”€โ”€ static/         # CSS, JS, and assets
โ”‚   โ””โ”€โ”€ templates/      # HTML templates
โ”œโ”€โ”€ setup.py            # Package setup
โ”œโ”€โ”€ pyproject.toml      # Modern Python packaging
โ”œโ”€โ”€ requirements.txt    # Dependencies
โ””โ”€โ”€ README.md          # This file

Building from Source

# Clone the repository
git clone https://github.com/PC0staS/netwatch.git
cd netwatch

# Install in development mode
pip install -e .

# Run the console version
netwatch

# Run the web version
netwatch-web

๐ŸŽฏ Use Cases

  • Network Debugging: Monitor interface activity during troubleshooting
  • Performance Monitoring: Track bandwidth usage on specific interfaces
  • Development: Monitor network activity during application development
  • System Administration: Quick network interface overview
  • Educational: Learn about network interfaces and traffic patterns
  • Remote Monitoring: Use web interface for remote network monitoring

๐Ÿš€ Cross-Platform Support

Windows

  • Full support with PowerShell and Command Prompt
  • Colorful interface with emoji support
  • All network interfaces detected
  • Web interface works with all browsers

Linux

  • Native terminal support
  • Works with all major distributions
  • Systemd service compatible
  • Web interface accessible remotely

macOS

  • Terminal.app and iTerm2 support
  • Full color and emoji support
  • Works with all network interfaces
  • Safari and Chrome compatible

๐Ÿ“ Commands

Console Commands

  • Start Console: netwatch
  • Stop: Ctrl+C
  • Interface Selection: Follow on-screen prompts

Web Commands

  • Start Web Interface (localhost only): netwatch-web
  • Start Web Interface (network access): netwatch-web --network
  • Custom Host/Port: netwatch-web --host 0.0.0.0 --port 8080
  • Network + Custom Port: netwatch-web --network --port 8080
  • Debug Mode: netwatch-web --debug
  • Help: netwatch-web --help

Network Access

  • Localhost only: netwatch-web (default)
  • Network access: netwatch-web --network or netwatch-web --host 0.0.0.0
  • Access from other devices: Use your computer's IP address (e.g., http://192.168.1.100:5000)

๐ŸŒ API Endpoints

The web interface provides REST API endpoints:

  • GET /api/interfaces - List available network interfaces
  • GET /api/stats - Get current network statistics
  • POST /api/start_monitoring - Start monitoring selected interfaces
  • POST /api/stop_monitoring - Stop monitoring

๐ŸŽ‰ Examples

Monitor All Interfaces

netwatch
# Select: 0

Monitor Specific Interfaces

netwatch
# Select: 1,3,5

Monitor Single Interface

netwatch
# Select: 1

Start Web Interface on Custom Port

netwatch-web --port 8080

๐Ÿ› Troubleshooting

Common Issues

  1. No interfaces shown: Make sure you have network interfaces configured
  2. Colors not working: Ensure your terminal supports ANSI colors
  3. Permission errors: Some systems may require elevated privileges for network monitoring
  4. Import errors: Make sure all dependencies are installed: pip install -r requirements.txt
  5. Web interface not accessible: Check if port is available and firewall settings

Requirements

  • Minimum Python 3.7
  • psutil, Flask, Flask-SocketIO libraries
  • Terminal with ANSI color support
  • Modern web browser for web interface

๐Ÿ“„ License

This project is open source and available under the MIT License.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests or report issues.

๐Ÿ”ฎ Future Features

  • Export data to CSV/JSON
  • Historical data storage
  • Network alerts/notifications
  • Bandwidth usage graphs
  • Custom refresh intervals
  • Multiple monitoring modes
  • User authentication for web interface
  • Dark/Light theme toggle

Made with โค๏ธ for network monitoring enthusiasts!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netwatch_monitor-1.1.1.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netwatch_monitor-1.1.1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file netwatch_monitor-1.1.1.tar.gz.

File metadata

  • Download URL: netwatch_monitor-1.1.1.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for netwatch_monitor-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2112faecb01acaecbc294f8fb899bd09a0aeb782a1c91132984d6a4a209dfd4b
MD5 2842b5f64a05a7de9e311a73f95cb660
BLAKE2b-256 5d3b007e1aad106aae95677097cb035f7c699936a95760e5566301681cf56b3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for netwatch_monitor-1.1.1.tar.gz:

Publisher: publish.yml on PC0staS/netwatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netwatch_monitor-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for netwatch_monitor-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 673f865d68c1c0ace28b891846c4b36a5470090c6a3e5a65fa8d0a0f8b69d80e
MD5 c796576dafe88f47a22c161c28734626
BLAKE2b-256 2b963081895216e407b0df44023704d3750368e2c17f78b0232072962f04f191

See more details on using hashes here.

Provenance

The following attestation bundles were made for netwatch_monitor-1.1.1-py3-none-any.whl:

Publisher: publish.yml on PC0staS/netwatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page