All Projects → ekanite → Ekanite

ekanite / Ekanite

Licence: mit
The Syslog server with built-in search

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Ekanite

narc
Small utility to watch log files and ship to syslog service.
Stars: ✭ 18 (-97.53%)
Mutual labels:  logs, syslog
rkubelog
Send k8s Logs to Papertrail and Loggly Without DaemonSets (for Nodeless Clusters)
Stars: ✭ 15 (-97.94%)
Mutual labels:  logs, syslog
Brim
Desktop application to efficiently search large packet captures and Zeek logs.
Stars: ✭ 976 (+33.88%)
Mutual labels:  search, logs
Go Syslog
Blazing fast syslog parser
Stars: ✭ 370 (-49.25%)
Mutual labels:  logs, syslog
Riot
Go Open Source, Distributed, Simple and efficient Search Engine; Warning: This is V1 and beta version, because of big memory consume, and the V2 will be rewrite all code.
Stars: ✭ 6,025 (+726.47%)
Mutual labels:  search
Cabin
🌲 Cabin is the best JavaScript and Node.js logging service and logging npm package
Stars: ✭ 622 (-14.68%)
Mutual labels:  logs
Euclidesdb
A multi-model machine learning feature embedding database
Stars: ✭ 615 (-15.64%)
Mutual labels:  search
Semantic logger
Semantic Logger is a feature rich logging framework, and replacement for existing Ruby & Rails loggers.
Stars: ✭ 611 (-16.19%)
Mutual labels:  syslog
Dext
🔍 A smart launcher. Powered by JavaScript.
Stars: ✭ 713 (-2.19%)
Mutual labels:  search
Ripgrep
ripgrep recursively searches directories for a regex pattern while respecting your gitignore
Stars: ✭ 28,564 (+3818.24%)
Mutual labels:  search
Search cop
Search engine like fulltext query support for ActiveRecord
Stars: ✭ 660 (-9.47%)
Mutual labels:  search
Pg search
pg_search builds ActiveRecord named scopes that take advantage of PostgreSQL’s full text search
Stars: ✭ 619 (-15.09%)
Mutual labels:  search
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+757.48%)
Mutual labels:  search
Search Deflector
A small program that forwards searches from Cortana to your preferred browser and search engine.
Stars: ✭ 620 (-14.95%)
Mutual labels:  search
Laravel Searchable
Pragmatically search through models and other sources
Stars: ✭ 701 (-3.84%)
Mutual labels:  search
Manticoresearch
Database for search
Stars: ✭ 610 (-16.32%)
Mutual labels:  search
Hyperlog Android
Utility logger library for storing logs into database and push them to remote server for debugging
Stars: ✭ 647 (-11.25%)
Mutual labels:  logs
Elasticsql
convert sql to elasticsearch DSL in golang(go)
Stars: ✭ 687 (-5.76%)
Mutual labels:  search
Elasticsuite
Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
Stars: ✭ 647 (-11.25%)
Mutual labels:  search
Sou
简单搜索,一个简单的前端界面。用惯了各种导航首页,满屏幕尽是各种不厌其烦的广告和资讯;尝试自己写个自己的主页。
Stars: ✭ 628 (-13.85%)
Mutual labels:  search

For detailed look at the goals, design, and implementation of this project, check out these blog posts.

Ekanite Circle CI GoDoc Go Report Card Release

Ekanite is a high-performance syslog server with built-in text search. Its goal is to do a couple of things, and do them well -- accept log messages over the network, and make it easy to search the messages. What it lacks in feature, it makes up for in focus. Built in Go, it has no external dependencies, which makes deployment easy.

Features include:

  • Supports reception of log messages over UDP, TCP, and TCP with TLS.
  • Full text search of all received log messages.
  • Full parsing of RFC5424 headers.
  • Log messages are indexed by parsed timestamp, if one is available. This means search results are presented in the order the messages occurred, not in the order they were received, ensuring sensible display even with delayed senders.
  • Automatic data-retention management. Ekanite deletes indexed log data older than a configurable time period.
  • Not a JVM in sight.

Search is implemented using the bleve search library. For some performance analysis of bleve, and of the sharding techniques used by Ekanite, check out this post.

Getting started

The quickest way to get running on OSX and Linux is to download a pre-built release binary. You can find these binaries on the Github releases page. Once installed, you can start Ekanite like so:

ekanited -datadir ~/ekanite_data # Or any directory of your choice.

To see all Ekanite options pass -h on the command line.

If you want to build Ekanite, either because you want the latest code or a pre-built binary for platform is not available, take a look at CONTRIBUTING.md.

Sending logs to Ekanite

For now, for Ekanite to accept logs, your syslog client must be configured such that the log lines are RFC5424 compliant, and in the following format:

<PRI>VERSION TIMESTAMP HOSTNAME APP-NAME PROC-ID MSGID MSG"

Consult the RFC to learn what each of these fields is. The TIMESTAMP field must be in RFC3339 format. Both rsyslog and syslog-ng support templating, which make it very easy for those programs to format logs correctly and transmit the logs to Ekanite. Templates and installation instructions for both systems are below.

rsyslog

# Send messages to Ekanite over TCP using the template. Assumes Ekanite is listening on 127.0.0.1:5514
$template Ekanite,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% - %msg%\n"
*.*             @@127.0.0.1:5514;Ekanite

Add this template to /etc/rsyslog.d/23-ekanite.conf and then restart rsyslog using the command sudo service rsyslog restart.

syslog-ng

source s_ekanite {
	system();	# Check which OS & collect system logs
	internal();	# Collect syslog-ng logs
};
template Ekanite { template("<${PRI}>1 ${ISODATE} ${HOST} ${PROGRAM} ${PID} - $MSG\n"); template_escape(no) };
destination d_ekanite {
	tcp("127.0.0.1" port(5514) template(Ekanite));
};

log {
	source(s_ekanite);
	destination(d_ekanite);
};

Add this template to /etc/syslog-ng/syslog-ng.conf and then restart syslog-ng using the command /etc/init.d/syslog-ng restart.

With these changes in place rsyslog or syslog-ng will continue to send logs to any existing destination, and also forward the logs to Ekanite.

Searching the logs

Search support is pretty simple at the moment. You have two options -- a simple telnet-like interface, and a browser-based query interface.

Telnet interface

Telnet to the query server (see the command line options) and enter a search term. The query language supported is the simple language supported by bleve, but a more sophisiticated query syntax, including searching for specific field values, may be supported soon.

For example, below is an example search session, showing accesses to the login URL of a Wordpress site. The telnet clients connects to the query server and enters the string login

$ telnet 127.0.0.1 9950
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
login
<134>0 2015-05-05T23:50:17.025568+00:00 fisher apache-access - - 65.98.59.154 - - [05/May/2015:23:50:12 +0000] "GET /wp-login.php HTTP/1.0" 200 206 "-" "-"
<134>0 2015-05-06T01:24:41.232890+00:00 fisher apache-access - - 104.140.83.221 - - [06/May/2015:01:24:40 +0000] "GET /wp-login.php?action=register HTTP/1.0" 200 206 "http://www.philipotoole.com/" "Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.17"
<134>0 2015-05-06T01:24:41.232895+00:00 fisher apache-access - - 104.140.83.221 - - [06/May/2015:01:24:40 +0000] "GET /wp-login.php?action=register HTTP/1.1" 200 243 "http://www.philipotoole.com/wp-login.php?action=register" "Opera/9.80 (Windows NT 6.2; Win64; x64) Presto/2.12.388 Version/12.17"
<134>0 2015-05-06T02:47:54.612953+00:00 fisher apache-access - - 184.68.20.22 - - [06/May/2015:02:47:51 +0000] "GET /wp-login.php HTTP/1.1" 200 243 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17"
<134>0 2015-05-06T04:20:49.008609+00:00 fisher apache-access - - 193.104.41.186 - - [06/May/2015:04:20:46 +0000] "POST /wp-login.php HTTP/1.1" 200 206 "-" "Opera 10.00"

Perhaps you only want to search for POST accesses to that URL:

login -GET
<134>0 2015-05-06T04:20:49.008609+00:00 fisher apache-access - - 193.104.41.186 - - [06/May/2015:04:20:46 +0000] "POST /wp-login.php HTTP/1.1" 200 206 "-" "Opera 10.00"

A more sophisticated client program is planned.

Browser interface

The browser-based interface also accepts bleve-style queries, identical to those described in the Telnet section. By default the browser interface is available at http://localhost:8080. An example session is shown below.

Data Diagram

Diagnostics

Basic statistics and diagnostics are available. Visit http://localhost:9951/debug/vars to retrieve this information. The host and port can be changed via the -diag command-line option.

Building New Parsers

The architecture now supports the easy implementation of new parsers beyond the stock syslog in 3 easy steps:

  1. In input/parser.go expand supportedFormats() to capture the additional standard and name.
  2. In parser/, create the new input format parser using appropriate regex statements.
    • Ensure that the new parser includes a timestamp field compatible with RFC3339, e.g. 2006-01-02T15:04:05Z07:00
  3. Back in input/parser.go, update NewParser() to properly instantiate the new input format parser.

Project Status

The project is semi-maintained -- contributions in the form of bug reports and pull requests are welcome. Much work remains around performance and scaling, and you can check out the issues for more details.

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].