Giter VIP home page Giter VIP logo

stick's Introduction

Stick

Small service for saving json documents from HTTP POST into Elasticsearch.

How to run

Example of available env vars with their default values:

docker run
    -d --restart=always \
    --name stick \
    -e STICK_ELASTIC_URL=http://localhost:9200 \  ## elasticsearch url
    -e STICK_ELASTIC_HEALTHCHECK_INTERVAL=10 \    ## check elasticsearch every 10 seconds
    -e STICK_ELASTIC_MAX_RETRIES=5 \              ## maximal amount of retries
    -e STICK_COMMIT_AMOUNT=500 \       ## commit elastic bulk query after 500 documents
    -e STICK_COMMIT_INTERVAL=10 \      ## commit elastic bulk every 10 seconds
    -e STICK_INTERNAL_BUFFER=1000 \    ## size of internal message buffer
    -e STICK_WORKERS=5 \               ## amount of parallel goroutines for commiting into elasticsearch
    -p 8080:8080 \
    ontrif/stick

Then send any valid json to 8080 port:

curl -XPOST localhost:8080/ -d '{"test":"me"}'

Note: @timestamp field will be added automatically (UTC time when message arrived to server).

stick's People

Contributors

ont avatar

Stargazers

 avatar

Watchers

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