Skip to content

LogInsight is a Python tool for analyzing server logs. It tracks requests per IP, identifies top endpoints, detects suspicious activities, and saves the insights in a structured CSV file.

Notifications You must be signed in to change notification settings

Priyansu-Bhandari/LogInsight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LogInsight

LogInsight is a Python-based log file analyzer that extracts meaningful insights from server logs. It provides functionalities to analyze requests per IP address, identify frequently accessed endpoints, and detect suspicious activities. Additionally, the results are saved in a well-structured CSV file for further review.


Features

  • Requests Per IP Address: Analyze and display the count of requests made by each IP address.
  • Most Accessed Endpoint: Identify the most frequently accessed endpoint or resource in the log file.
  • Suspicious Activity Detection: Detect IP addresses with failed login attempts exceeding a customizable threshold.
  • Save to CSV: Export the analysis results to a structured CSV file with separate sections for each feature.

Usage

  1. Clone the repository:
    git clone https://github.com/Priyansu-Bhandari/LogInsight-.git  
    cd LogInsight
  2. Update the log_file_path variable in the script to point to your log file.
  3. Run the script:
    python log_insight.py
  4. View results in the terminal and the generated CSV file (log_analysis_results.csv).

Example Output

  1. Requests Per IP
IP Address           Request Count  
192.168.0.1          123  
203.0.113.45         98  
  1. Most Accessed Endpoint
/endpoint/path (Accessed 345 times)  
  1. Suspicious Activity
IP Address           Failed Login Attempts  
203.0.113.45         15  
192.168.0.1          12  

CSV Output

The results are saved in a file named log_analysis_results.csv with the following sections:

  • Requests per IP
  • Most Accessed Endpoint
  • Suspicious Activity

About

LogInsight is a Python tool for analyzing server logs. It tracks requests per IP, identifies top endpoints, detects suspicious activities, and saves the insights in a structured CSV file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published