Giter Club home page Giter Club logo

gtsa's Introduction

GTSA project

Rust

Gelf To Sentry Adapter is the simple solution to proxy gelf messages (messages for Graylog) to Sentry

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You need to docker or cargo with rust

Installing and running

You can install and run it with cargo

cargo install gtsa
gtsa

Docker hub

docker pull mnwamnowich/gtsa
docker run -p 8080:8080/udp --env SENTRY_DSN=dsn --name gtsa mnwamnowich/gtsa

Or docker build

docker build -t gtsa .
docker run -p 8080:8080/udp --env SENTRY_DSN=dsn --name gtsa gtsa 

Now you can sent data on udp

Deployment

For deploying GTSA you must to set is only one env variable:

SENTRY_DSN=xxx

SENTRY DSN must be only in the new format (without secret key)!

Also GTSA have a some env variables with default values, but you can edit it:

UDP_ADDR=0.0.0.0:8080 //udp address
TCP_ADDR=0.0.0.0:8081 // tcp address
SYSTEM=Gelf Mover // name of your application
READER_THREADS=1 // threads for decoding and encoding json messages (max parrallel messages processing)
UNPACKER_THREADS=1 // threads for unpacking messages what received with gz or zlib algoritms (max parrallel messages unpacking)
MAX_PARALLEL_CHUNKS=100000 // maximum chunked messages what GTSA can processing, old messages will be flush (udp only)

Examples

Sending udp message

 echo -n -e '{ "version": "1.1", "host": "example.org", "short_message": "A short message", "level": 5, "_some_info": "foo", "timestamp": 1582213226}'"" | nc -w0 -u 0.0.0.0 8080

Sending tcp message

echo -n -e '{ "version": "1.1", "host": "example.org", "short_message": "A short message", "level": 5, "_some_info": "foo", "timestamp": 1582213226}'"\0" | nc -w0 0.0.0.0 8081

Built With

  • actix - The actor framework used
  • tokio - Async realisation
  • cargo - Built with

Contributing

I hope you know what you need to do.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Mikhail Panfilov - Initial work - Mnwa

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

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.