Giter VIP home page Giter VIP logo

syslog-rfc5424-parser's Introduction

This module implements an RFC 5424 IETF Syslog Protocol parser in Python, using the lark parser-generator. It should work on Python 2.7 or Python 3.3+.

Build Status PyPI version Documentation Status

The file example_syslog_server.py contains a fully-functional Syslog server which will receive messages on a UNIX domain socket and print them to stdout as JSON blobs.

A word on performance

On a fairly modern system (Xeon E3-1270v3), it takes about 230µs to parse a single syslog message and construct a SyslogMessage object (which is to say, you should be able to parse about 4300 per second with a single-threaded process). Are you really in that much of a rush, anyway?

If you're interested in a faster, non-Python alternative, you may also enjoy rust-syslog-rfc5424.

Usage

Install:

pip install -r requirements.txt

python setup.py install

Run:

sudo ./syslog_server.py -p [udp|tcp] --port [port_number]

syslog-rfc5424-parser's People

Contributors

little-dude avatar roguelazer avatar

Watchers

 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.