Giter Club home page Giter Club logo

log2esd's Introduction

Log2esd

Table of Contents

Introduction

Log2esd is a daemon that writting app's log datas to elasticsearch service;The datas will be read in lines;

Installing

You can install log2esd by sources;

$ git clone https://github.com/vpon/log2esd.git
$ cd log2esd
$ ./build_log2esd.sh
$ cd bin

The execute file is under directory ./log2esd/bin and copy the file to where you want;

Restrictive condition

Your app's log files must be named in format "YYYYDDMMHHMM.log", and format of datas must be json, If not the daemon will not work correct;

Usage

Options:
         -h <192.168.0.1:9200> els service (default: localhost:9200)
         -s <app_logs> directory of app's logs (default: ./log)
         -x <index_prefix> index prefix (default: empty)
         -v <index_divisor> index divisor, must be (2,3,4,6,8,12,24) (default: 2)
         -n <lines> lines of read once (default: 2)
         -b <line_size> size of line (default: 2048)
         -i <interval> waiting interval (default: 10)
         -w <daemon log> directory of daemon logs (default: /data/logs/log2esd)
         -l <level> level of daemon logs (default: INFO)
         -r <yes/no> remove log file after send all datas (default: yes)
         -d <pid_file> daemonize log2esd
         -H Show this help

Monitor

Under the logs directory, have two files(.written_stat.txt & .written_file.txt).The statistic of written datas saved in file of the first one and the statistic of writting datas saved in file of the second.

Dependencies

  • curl-7.39.0

log2esd's People

Contributors

changyuezhou avatar

Stargazers

Jesper Lundgren avatar  avatar Weiwen Zhang avatar

Watchers

 avatar Wilber Chao avatar cloud avatar Wesley Tseng avatar James Cloos avatar  avatar YC avatar Weiwen Zhang avatar Jiahong Chen avatar  avatar mylake avatar Long Alan avatar tomlelouch avatar xdlai avatar CathyH avatar  avatar  avatar  avatar  avatar yan su avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.