Skip to content

N4V1CKAS/log-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“œ Log Analyzer

Quickly inspect system, authentication, Nginx or custom logs from a single interactive menu

๐Ÿ› ๏ธ Technologies

  • Bash scripting
  • Core Linux tools: grep, zgrep, awk, sort, uniq, tail, zcat

๐Ÿš€ Features

  • Analyzes common Ubuntu logs
  • Analyzes any custom log file path
  • Handles compressed logs (.gz) automatically
  • Highlights errors, warnings and failed login attempts
  • Shows top repeated log messages for quick insight
  • User-friendly interactive menu

๐Ÿ’ก Why I built it

This script was mainly created to practice Linux admin and bash scripting skills:

  • Navigating log formats and rotated logs
  • Filtering and highlighting important log messages
  • Writing safer Bash scripts with strict mode, file checks and handling empty results
  • Creating a reusable, menu-driven tool

๐Ÿ” How it works

The script prints a menu to select which log to analyze, each option prints:

  • Last few lines of the log
  • Recent errors and warnings
  • Top repeated messages or most relevant stats (failed logins, top IPs)
  • Optionally, you can input your own custom log path that can be scanned

๐Ÿ“ฆ Usage

  1. Clone the repository
  2. Make the script executable: chmod +x analyzer.sh
  3. Run the script (some logs may need sudo): ./analyzer.sh
  4. Follow the interactive menu to analyze the logs

๐Ÿ”ฎ Planned Improvements

  • Smarter error/warning filtering and sorting to show the most relevant messages first
  • Optional export to a text file
  • Show basic log rotation or size info
  • Loop back to the menu instead of exiting

About

Menu-driven script to filter errors on system, auth, Nginx or custom logs on Ubuntu.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages