Skip to content

NetWatch: A real-time network monitoring tool that tracks established connections and sends email alerts if the threshold is exceeded, ensuring secure and efficient network performance

License

Notifications You must be signed in to change notification settings

viehgroup/NetWatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Monitoring Tool

A basic network monitoring tool that tracks the number of established network connections and sends an email alert if the number of connections exceeds a set threshold. The tool is designed to continuously monitor network activity and provide real-time information on established connections.

Features

-> Encrypted email password for added security
-> Threshold for number of connections can be set by the administrator
-> Sends an email alert if the number of established connections exceeds the set threshold
-> Monitors network activity continuously and provides real-time information on established connections
-> User-friendly and easy to use

Requirements

-> Python 3
-> psutil library
-> cryptography library

Installation

1. Clone the repository to your local machine
2. Install the dependencies by running the following command:
pip install -r requirements.txt
3. Replace the values in the code with your own email settings and encrypted email password.
4. Run the script by executing the following command:
python network_monitor.py

Configuration

The tool can be configured by changing the following values in the code:

-> SMTP_SERVER: The address of the SMTP server to be used to send the email alert
-> SMTP_PORT: The port number of the SMTP server
-> FROM_ADDRESS: The email address from which the alert will be sent
-> TO_ADDRESS: The email address to which the alert will be sent
-> SUBJECT: The subject of the email alert
-> PASSWORD: The encrypted email password
-> THRESHOLD: The number of established connections beyond which an email alert will be sent
-> SLEEP_INTERVAL: The interval (in seconds) at which the script checks for established connections

Usage

The tool will start monitoring the network activity and print the number of established connections every 5 seconds (by default). If the number of connections exceeds the set threshold, an email alert will be sent to the administrator. The tool can be stopped by pressing Ctrl + C on the keyboard.

Trulli

Note

The encrypted email password provided in the code is for demonstration purposes only and should be replaced with your own encrypted password. It is recommended to encrypt the password using the 'cryptography' library before using it in the code.

About

NetWatch: A real-time network monitoring tool that tracks established connections and sends email alerts if the threshold is exceeded, ensuring secure and efficient network performance

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages