-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated README with new features & usage.
- Loading branch information
Daniel Mikusa
committed
Apr 24, 2019
1 parent
dc95979
commit 9dabe92
Showing
1 changed file
with
59 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,34 +4,66 @@ Tops logs is a tool which can be used to parse through access logs to understand | |
|
||
## Features | ||
|
||
* Read access logs and report the following metrics for all log types: | ||
- Duration of logs (oldest and newest log dates) | ||
- Total number of requests | ||
- Total number of requests the tool didn't understand/couldn't parse | ||
- Top X Response Codes | ||
- Top X Request Methods | ||
- Top X Requests (no query params) | ||
- Top X Requests (with query params) | ||
* Additional reports supported by combined & Gorouter log formats: | ||
- Top X User Agents | ||
- Top X Referrers | ||
- Top X Client IPs | ||
* Additional reports supported by Gorouter log format: | ||
- Top X Backend Address (Cells & Platform VMs) | ||
- Top X X-Forwarded-For Ips | ||
- Top X Destination Hosts | ||
- Top X App GUIDs | ||
- Response time histogram | ||
* Supported log formats: | ||
- Common | ||
- Combined | ||
- Gorouter | ||
- Cloud Controller | ||
|
||
* Read access logs and report the following metrics: | ||
- Common | ||
- Duration of logs (oldest and newest log dates) | ||
- Total number of requests | ||
- Total number of requests the tool didn't understand/couldn't parse | ||
- Top X Response Codes | ||
- Top X Request Methods | ||
- Top X Requests (no query params) | ||
- Top X Requests (with query params) | ||
- Combined | ||
- Duration of logs (oldest and newest log dates) | ||
- Total number of requests | ||
- Total number of requests the tool didn't understand/couldn't parse | ||
- Top X Response Codes | ||
- Top X Request Methods | ||
- Top X Requests (no query params) | ||
- Top X Requests (with query params) | ||
- Top X User Agents | ||
- Top X Referrers | ||
- Top X Client IPs | ||
- Cloud Controller | ||
- Duration of logs (oldest and newest log dates) | ||
- Total number of requests | ||
- Total number of requests the tool didn't understand/couldn't parse | ||
- Top X Response Codes | ||
- Top X Request Methods | ||
- Top X Requests (no query params) | ||
- Top X Requests (with query params) | ||
- Top X User Agents | ||
- Top X Referrers | ||
- Top X X-Forwarded-For Ips | ||
- Response time histogram | ||
- Gorouter | ||
- Duration of logs (oldest and newest log dates) | ||
- Total number of requests | ||
- Total number of requests the tool didn't understand/couldn't parse | ||
- Top X Response Codes | ||
- Top X Request Methods | ||
- Top X Requests (no query params) | ||
- Top X Requests (with query params) | ||
- Top X User Agents | ||
- Top X Referrers | ||
- Top X Client IPs | ||
- Top X X-Forwarded-For Ips | ||
- Response time histogram | ||
- Top X Backend Address (Cells & Platform VMs) | ||
- Top X Destination Hosts | ||
- Top X App GUIDs | ||
|
||
## Usage | ||
|
||
``` | ||
$ top-logs -h | ||
top-logs 0.1.0 | ||
$ ./target/release/top-logs -i -f cloud_controller data/cloud_controller/nginx.access.log* -h | ||
top-logs 1.1.0 | ||
Daniel Mikusa <[email protected]> | ||
Parses various access log formats and prints stats helpful for debugging/troubleshooting. | ||
|
@@ -44,8 +76,13 @@ FLAGS: | |
-V, --version Prints version information | ||
OPTIONS: | ||
-f, --format <LOG_FORMAT> access log format [possible values: common, combined, gorouter, cloud_controller] | ||
-t, --top <NUM> number of results to display [default: 10] | ||
-f, --format <LOG_FORMAT> | ||
access log format [possible values: common, combined, gorouter, cloud_controller] | ||
-m, --min-response-time-threshold <MIN_THRESHOLD> | ||
Minimum threshold in number of requests for a response time bucket to be displayed. Smaller buckets are | ||
grouped together. [default: 100] | ||
-t, --top <NUM> number of results to display [default: 10] | ||
ARGS: | ||
<ACCESS_LOG>... Access logs to process | ||
|