Code Monkey home page Code Monkey logo

sql-to-syslog's Introduction

SQL 2 Syslog

Some applications contain access logs or other relevant data in an SQL database. This lightweight and performant tool queries the database with a cron syntax and forwards the data to your favorite logging tool or SIEM via Syslog protocol.

Features

  • Single executable, compatible with every OS

  • Docker / K8s

  • Lightweight & Fast

  • Auto-resume after failure with checkpoints

  • Deliver messages evenly over allocated timeframe

As database backend, currently only Microsoft SQL is supported. Other databases can be easily added - contributions are more than welcome.

Config

The configuration with an example is contained in the config.json. If you want to connect multiple syslog servers or use multiple credentials, you'll need to use multiple instances.

  • Database: Connection string to compatible database, e.g. MSSQL

  • Name: This is just used for error messages and caching

  • cronWithLeadingSecond: Typical cron format, but with a leading second to allow intervals smaller than one minute, see more

  • Query: If you didn't specify a database in the connection string, remember to use the USE command to select a database. Use :lastCheck to get the time of the last sync. If the datetime in your table does not contain a timezone, make sure to cast that column to a matching timezone.

  • initialLastCheckOffsetMin: On the first run, how many minutes in the past should :lastCheck be?

Sponsors

CRIF GmbH

sql-to-syslog's People

Contributors

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