All Projects → fcambus → Logswan

fcambus / Logswan

Licence: bsd-2-clause
Fast Web log analyzer using probabilistic data structures

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Logswan

Kataribe
Access log profiler based on response time
Stars: ✭ 298 (-20.53%)
Mutual labels:  log, analyzer
Wowanalyzer
WoWAnalyzer is a tool to help you analyze and improve your World of Warcraft raiding performance through various relevant metrics and gameplay suggestions.
Stars: ✭ 371 (-1.07%)
Mutual labels:  log, analyzer
Awstats
AWStats Log Analyzer project (official sources)
Stars: ✭ 238 (-36.53%)
Mutual labels:  log, analyzer
Rhit
A nginx log explorer
Stars: ✭ 231 (-38.4%)
Mutual labels:  log, analyzer
Statoscope
Analyzes webpack stats and shows detailed info about it on the screen.
Stars: ✭ 322 (-14.13%)
Mutual labels:  analyzer
Daiquiri
Python library to easily setup basic logging functionality
Stars: ✭ 308 (-17.87%)
Mutual labels:  log
Borgert Cms
Borgert is a CMS Open Source created with Laravel Framework 5.6
Stars: ✭ 298 (-20.53%)
Mutual labels:  log
Baize
白泽自动化运维系统:配置管理、网络探测、资产管理、业务管理、CMDB、CD、DevOps、作业编排、任务编排等功能,未来将添加监控、报警、日志分析、大数据分析等部分内容
Stars: ✭ 296 (-21.07%)
Mutual labels:  log
Gitlhevcanalyzer
Gitl HEVC/H.265 Analyzer based on Qt. Custom filters supported.
Stars: ✭ 361 (-3.73%)
Mutual labels:  analyzer
Nn tools
Neural Network Tools: Converter and Analyzer. For caffe, pytorch, draknet and so on.
Stars: ✭ 334 (-10.93%)
Mutual labels:  analyzer
Waltz
Waltz is a quorum-based distributed write-ahead log for replicating transactions
Stars: ✭ 328 (-12.53%)
Mutual labels:  log
Super
Secure, Unified, Powerful and Extensible Rust Android Analyzer
Stars: ✭ 340 (-9.33%)
Mutual labels:  analyzer
Anymethodlog
Log any method call of object in Objective-C
Stars: ✭ 361 (-3.73%)
Mutual labels:  log
Log
Time-tracker
Stars: ✭ 316 (-15.73%)
Mutual labels:  log
Console
OS X console application.
Stars: ✭ 298 (-20.53%)
Mutual labels:  log
Cocoadebug
iOS Debugging Tool 🚀
Stars: ✭ 3,769 (+905.07%)
Mutual labels:  log
Phpqa
PHPQA all-in-one Analyzer CLI tool
Stars: ✭ 336 (-10.4%)
Mutual labels:  analyzer
Vim Flog
A lightweight and powerful git branch viewer for vim.
Stars: ✭ 314 (-16.27%)
Mutual labels:  log
Laravel Activitylog
Log activity inside your Laravel app
Stars: ✭ 4,123 (+999.47%)
Mutual labels:  log
Unused Scanner
Detect unused composer dependencies
Stars: ✭ 363 (-3.2%)
Mutual labels:  analyzer
                                _____
                            .xiX*****Xix.
                          .X7'        '4Xk,
                         dXl            'XX.        .
                        xXXl             XXl        .
                        4XXX             XX'
                       .  ,x            iX'   _,,xxii
                       |   ²|        ,iX7,xiiXXXXXXXl
                       |          .xi,xiXXXXXXXXXXXX:
                       .      ..iXXiXXXXXXXXXXXXXXX7.
                       .    .xXXXXXXXXXXXXXXX'XXXX7 .
                       |   ,XXXXXXXXXXXXXXXX'XXX7'  |
                       :  .XXXXX7*'"' 2XXX7'XX7'    |
  __/ \     _____    ____  \XX' _____  47'  ___  ___      _____     __
.\\_   \___/  _  \__/  _/_______\  _/______/  /  \  \____/  _  \___/  \  _____
. /     __    Y _ __   \__  _________  _____  \/\/   ____ _ _   ______ \/ __///
:/       /    |    \    |'   \/   \/    \/            \/    Y    \/   \    \  :
|\______/\_________/____|    /\____     /\_____/\_____/\____|____/\____\___/  |
+--------------------- \____/ --- \____/ ----:----------------------h7/dS!----+
                       .                     |      :
                       : .                   :      |
                       | .     Logswan       .      |
                       | :                       .  |
                       |_|_______________________|__|
                         |                       :
                                                 .

Logswan

Logswan is a fast Web log analyzer using probabilistic data structures. It is targeted at very large log files, typically APIs logs. It has constant memory usage regardless of the log file size, and takes approximatively 4MB of RAM.

Unique visitors counting is performed using two HyperLogLog counters (one for IPv4, and another one for IPv6), providing a relative accuracy of 0.10%. String representations of IP addresses are used and preferred as they offer better precision.

Project design goals include: speed, memory-usage efficiency, and keeping the code as simple as possible.

Logswan is opinionated software:

  • It only supports the Common Log Format, in order to keep the parsing code simple. It can of course process the Combined Log Format as well (referer and user agent fields will be discarded)
  • It does not split results per day, but log files can be split prior to being processed
  • Input file size and bandwidth usage are reported in bytes, there are no plans to format or round them

Logswan is written with security in mind and is running sandboxed on OpenBSD (using pledge). Experimental seccomp support is available for selected architectures and can be enabled by setting the ENABLE_SECCOMP variable to 1 when invoking CMake. It has also been extensively fuzzed using AFL and Honggfuzz.

Features

Currently implemented features:

  • Counting used bandwidth
  • Counting number of processed lines / invalid lines
  • Counting number of hits (IPv4 and IPv6 hits)
  • Counting visits (unique IP addresses for both IPv4 and IPv6)
  • GeoIP lookups (for both IPv4 and IPv6)
  • Hourly hits distribution
  • HTTP method distribution
  • HTTP protocol distribution
  • HTTP status codes distribution

Dependencies

Logswan uses the CMake build system and requires Jansson and libmaxminddb libraries and header files.

Installing dependencies

  • OpenBSD: pkg_add -r cmake jansson libmaxminddb
  • NetBSD: pkgin in cmake jansson libmaxminddb
  • FreeBSD: pkg install cmake jansson libmaxminddb
  • macOS: brew install cmake jansson libmaxminddb
  • Alpine Linux: apk add cmake gcc make musl-dev jansson-dev libmaxminddb-dev
  • Debian / Ubuntu: apt-get install build-essential cmake libjansson-dev libmaxminddb-dev
  • Fedora: dnf install cmake gcc make jansson-devel libmaxminddb-devel

Building

mkdir build
cd build
cmake ..
make

Logswan has been successfully built and tested on OpenBSD, NetBSD, FreeBSD, macOS, and Linux with both Clang and GCC.

Packages

Logswan packages are available for:

GeoIP2 databases

Logswan looks for GeoIP2 databases in ${CMAKE_INSTALL_PREFIX}/share/dbip by default, which points to /usr/local/share/dbip.

A custom directory can be set using the GEOIP2DIR variable when invoking CMake:

cmake -DGEOIP2DIR=/var/db/dbip .

The free Creative Commons licensed DB-IP IP to Country Lite database can be downloaded here.

Alternatively, GeoLite2 Country database from MaxMind can be downloaded free of charge here, but require accepting an EULA and is not freely licensed.

Usage

logswan [-ghv] [-d db] logfile

If file is a single dash (`-'), logswan reads from the standard input.

The options are as follows:

-d db	Specify path to a GeoIP database.
-g	Enable GeoIP lookups.
-h	Display usage.
-v	Display version.

Logswan outputs JSON data to stdout.

License

Logswan is released under the BSD 2-Clause license. See LICENSE file for details.

Author

Logswan is developed by Frederic Cambus.

Resources

Project homepage: https://www.logswan.org

GitHub: https://github.com/fcambus/logswan

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].