Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aheissenberger/apache-vhosts-logfile-analyse
https://github.com/aheissenberger/apache-vhosts-logfile-analyse
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/aheissenberger/apache-vhosts-logfile-analyse
- Owner: aheissenberger
- License: bsd-2-clause
- Created: 2024-12-12T11:23:14.000Z (about 1 month ago)
- Default Branch: master
- Last Pushed: 2024-12-12T11:23:17.000Z (about 1 month ago)
- Last Synced: 2024-12-15T14:48:36.795Z (about 1 month ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# README
This repository provides two php scrips to combine apache log files (NSCA Combined Log Format) which are stored in a separate folder per domain into a SQLite database and export all logs ordered by timestamp in the (NSCA Combined Log Format with Virtual Host).
The export tool has multiple options to filter the log data and can directly feed the output to [GoAccess](https://goaccess.io) to provide a HTML based visual report.
## Usage
1. merge all logs (database is created in the current working directory)
```sh
php merge_logs.php --logdir="/var/logs/http"
```2. create a report
```sh
php export_logs.php --report
```3. view the report in a browser
open the file `report.html` in a web browser
**Tipp:** call each tool with `--help` to get all posible options
**manual report creation based on the exported logfile:**
```sh
goaccess access_log.log --log-format=VCOMBINED -a -o report.html
```## Requirements
- php 7.x (with SQLite)
- [Download GoAccess](https://goaccess.io/download) - open source real-time web log analyzer and interactive viewer that runs in a terminal in \*nix systems or through your browser.