https://github.com/indatawetrust/nginx-log-analyzer
A lightweight and easy-to-use Node.js tool for analyzing Nginx log files
https://github.com/indatawetrust/nginx-log-analyzer
analyzer cli http log logs monitoring nginx
Last synced: about 1 year ago
JSON representation
A lightweight and easy-to-use Node.js tool for analyzing Nginx log files
- Host: GitHub
- URL: https://github.com/indatawetrust/nginx-log-analyzer
- Owner: indatawetrust
- Created: 2025-04-02T19:15:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-02T19:15:56.000Z (about 1 year ago)
- Last Synced: 2025-04-02T19:21:31.514Z (about 1 year ago)
- Topics: analyzer, cli, http, log, logs, monitoring, nginx
- Language: JavaScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Nginx Log Analyzer
A lightweight and easy-to-use Node.js tool for analyzing Nginx log files. It provides insights such as the total number of requests, HTTP status codes distribution, and the most frequently accessed URLs.
## Features
- Analyze Nginx log files in the **Combined Log Format**.
- Count total requests and categorize them by HTTP status codes.
- Identify the most frequently accessed URLs.
- Simple and intuitive CLI interface.
## Installation
Install the package via npm:
```bash
npm install -g nginx-log-analyzer
```
## Usage
Run the tool in your terminal by specifying the path to your Nginx log file:
```bash
nginx-log-analyzer /path/to/access.log
```
Output
```
--- Log Analysis Results ---
Total Requests: 1523
HTTP Status Codes:
200: 1400
404: 50
500: 10
Most Frequently Accessed URLs:
/home: 350
/about: 200
/contact: 150
Top Browsers:
Chrome: 2 (40.00%)
Mobile Safari: 1 (20.00%)
Mobile Chrome: 1 (20.00%)
Edge: 1 (20.00%)
```
## Requirements
- Node.js v14 or higher