https://github.com/simonamdev/peek
Get a quick statistical peek into how nginx is handling requests.
https://github.com/simonamdev/peek
logging nginx parsing server statistics web
Last synced: 23 days ago
JSON representation
Get a quick statistical peek into how nginx is handling requests.
- Host: GitHub
- URL: https://github.com/simonamdev/peek
- Owner: simonamdev
- License: mit
- Created: 2017-02-11T07:39:17.000Z (over 9 years ago)
- Default Branch: develop
- Last Pushed: 2017-02-26T10:28:10.000Z (over 9 years ago)
- Last Synced: 2025-07-25T01:04:04.353Z (11 months ago)
- Topics: logging, nginx, parsing, server, statistics, web
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# peek
Get a quick peek into how nginx is performing by parsing the access log and generating some basic statistics.
## Requirements
* Python 3.x
* SQLite3
## Usage
For taking a quick look, which stores the statistics in an in-memory instance of SQLite:
```
python3 peek.py /var/log/nginx/access.log
```
Adjust the /path/to/access.log as necessary.
For persistence of the statistics, add the --persist flag
```
python3 peek.py /var/log/nginx/access.log --persist
```
This currently saves the statistics to the logs.db file in the same directory.
## Known issues
* Currently only works with nginx's default log format
* No check to see if logs.db exists before accessing it
## TODO
* More meaningful error messages when passing incorrect path to access logs
* Flag to specify path to logs database
* Web front end to parse/display the statistics without having to be logged into the same machine
## Contributions
Pull Requests more than welcome! :)
## Licence
MIT Licence