Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Nginx Log Analyzer

This project provides a Bash script to analyze Nginx access logs. The script extracts and displays the top 5 entries for IP addresses, requested paths, response status codes, and user agents.

Requirements

  • Bash
  • Nginx access log file with fields: IP address, Date and time, Request method/path, Status code, Response size, Referrer, User agent.

Usage

  1. Clone the repository:
    git clone https://github.com/your-username/nginx-log-analyzer.git
    cd nginx-log-analyzer
    
  2. Make the script executable:
    chmod +x nginx_log_analyzer.sh
    
  3. Run the script with the path to your log file:
    ./nginx_log_analyzer.sh /path/to/nginx-access.log
    
  4. The script will output:
  • Top 5 IP addresses with the most requests
  • Top 5 most requested paths
  • Top 5 response status codes
  • Top 5 user agents

About

Shell utility for parsing nginx access logs — top IPs, status code breakdown, most-requested paths.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages