Network Status MonitoringThis project provides a web-based interface to monitor the status of various network devices. It uses Flask for the backend, Socket.IO for real-time updates, and Bootstrap for the frontend styling.FeaturesNetwork Status Monitoring: View the status of multiple Wi-Fi devices, including whether they're up or down.Real-Time Ping Logs: Track the ping logs for each device, with timestamps and response times.Dynamic Network Updates: The app checks and updates network status at a configurable interval, displaying the current status for each device.Configurable Ping Interval: Set the ping interval dynamically through the web UI (default is 60 seconds).Countdown Timer: View the remaining time until the next ping update.Subnets Management: Automatically adds missing subnets to the network.conf file using the route -n (Linux/macOS) or route print (Windows) command to detect network configurations.Scanning Subnets for Devices: Scans each subnet for active devices and logs the active IPs found during the scan.Stop Scanning: Ability to stop the subnet scanning process at any time.Logging: Logs active IPs found during the subnet scan.Telnet Interface: Connect to network devices via Telnet and execute commands.SSH Interface: Connect to network devices via SSH and execute commands.Technologies UsedBackend: Python (Flask, Socket.IO, subprocess)Frontend: HTML, CSS, JavaScript (Bootstrap, FontAwesome)WebSocket: flask-socketio for real-time communicationTelnet: Python telnetlib for Telnet interactionsSSH: Python paramiko for SSH interactionsInstallationUsing DockerClone the repository:git clone https://github.com/yourusername/netstatus.git cd netstatusBuild and run the Docker container:docker-compose up --buildOpen your web browser and navigate to http://localhost:5000.Manual InstallationClone the repository:git clone https://github.com/rootjumper/netstatus.git cd netstatusCreate a virtual environment and activate it:python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`Install the required packages:pip install -r requirements.txtRun the application:python app.pyOpen your web browser and navigate to http://localhost:5000.ConfigurationNetwork ConfigurationThe network devices are configured in the network.conf file. This file contains a JSON object with the subnets to be monitored. The application will automatically update this file when new devices are added.Changing the PortManual InstallationTo change the port on which the application runs, you can modify the app.py file. Locate the following line and change the port number as needed:if __name__ == "__main__": socketio.run(app, host="0.0.0.0", port=5000)Replace 5000 with your desired port number.DockerTo change the port when using Docker, modify the docker-compose.yml file. Locate the following line and change the port number as needed:ports: - "5000:5000"The format is host_port:container_port. Replace the first 5000 with your desired host port number, and the second 5000 with the container port number if needed. Ensure that the container_port matches the port specified in app.py.Logging ConfigurationThe application uses Python's built-in logging module for logging. By default, the logging level is set to INFO. You can change the logging level by modifying the logging.basicConfig call in the app.py file:import logging logging.basicConfig(level=logging.INFO)Replace INFO with your desired logging level (e.g., DEBUG, WARNING, ERROR, CRITICAL).ThemesThe application supports multiple themes:Light ThemeDark ThemeBlack-Yellow ThemeYou can toggle between themes using the "Toggle Theme" button in the web interface.UsageAdding a New Network DeviceClick the "Add Network" button.Fill in the network name and IP address.Click "Add Network" to save the new device.Renaming a Network DeviceClick the edit icon next to the device name.Enter the new name and press Enter.Viewing Ping LogsHover over the ping log bars to view detailed information about each ping, including timestamp, status, response time, and time ago.Telnet SupportEnter Username/Password and click the Telnet icon button next to the device.Enter commands in the input box and click "Send".The Telnet log box will display the output of the commands.SSH SupportEnter Username/Password and click the SSH icon button next to the device.Enter commands in the input box and click "Send".The SSH log box will display the output of the commands.ContributingContributions are welcome! Please fork the repository and submit a pull request with your changes.BTC: bc1pragmz2qhtm6qzrljvvlsayfhtwtrc5egk4yfa60wr3ks7xv0musq7l7dn5 ETH: 0xA23B64E80a13F9ce54055F71b9d501AE92aBe378 Solana: EHi8PRa4t5Ge3EJ6GJF5omhpktFQdPdSeJKx78BCnJMPLicenseThis project is licensed under the MIT License. See the LICENSE file for details. Log in to post comments