loganalyzer

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

loganalyzer

Analyze access logs (Apache, nginx , load balancers) for quick troubleshoot

Contentes

  1. Usage
    1. Binaries
      1. Install
      2. Run
        1. top List top 10 IPs, requests, etc
        2. bandwidth Calculate total bandwidth
        3. custom search for a custom field

Usage

Binaries
Install

Download the most recent release binaries for your OS from https://github.com/cloudsark/loganalyzer/releases

Install each binary as follows,

  1. Move binary to '/usr/local/bin'
$ sudo mv loganalyzer /usr/local/bin 
  1. Verify the binary file is working
$ loganalyzer --help
Access log analyzer can be used to analyze web servers , load balancers access logs

Usage:
  loganalyzer [flags]
  loganalyzer [command]

Available Commands:
  bandwidth   Print total bandwidth
  custom      Search for a custom field
  help        Help about any command
  top         Print top 10 IPs, Requests , etc

Flags:
  -f, --file string   access log filename
  -h, --help          help for loganalyzer
  -v, --version       version for loganalyzer
Use "loganalyzer [command] --help" for more information about a command.
Run
top
  1. Get help
$ loganalyzer top --help
Get useful information about your web server, top command is used to print top 10 IPs, methods, requests and status codes

Usage:
  loganalyzer top [command]

Available Commands:
  ip          Print Top 10 IP addresses accessing your web server
  ip2loc      Print Top 10 IP addresses accessing your web server with their location
  method      Print Top 10 HTTP methods used
  request     Print Top 10 requests
  status      Print Top 10 status codes

Flags:
  -h, --help   help for top

Global Flags:
  -f, --file string   access log filename

Use "loganalyzer top [command] --help" for more information about a command.
  1. Print Top 10 IP addresses accessing your web server
$ loganalyzer -f access.log top ip
  1. Print Top 10 IP addresses accessing your web server with their location
$ loganalyzer -f access.log top ip2loc
  1. Print Top 10 HTTP methods used
$ loganalyzer -f access.log top method
  1. Print Top 10 requests
$ loganalyzer -f access.log top request
  1. Print Top 10 status codes
$ loganalyzer -f access.log top status
bandwidth
  1. Pring total bandwidth
$ loganalyzer -f access.log bandwidth
custom
  1. Search for a custom field. Provide the regex for the field and loganalyzer will look for it
$ loganalyzer -f apache-daily-access.log custom --field-regex '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL