Git Product home page Git Product logo

syslogjd's Introduction

syslogjd

Lightweight syslog to journald collector

badge badge badge

Receive syslog traffic on UDP port 514 and store it into journald.

Supported formats: RFC3164 and RFC5424

Generating installation packages

# install the Nim compiler, then:
nimble build_rpm
# or
nimble build_deb

Install and runtime dependencies

Only journald.

Usage

syslogjd starts once installed and listens on port 514 on all IP addreses.

Edit /etc/systemd/journald.conf to increase logging throttling limits if needed:

[Journal]
...
RateLimitIntervalSec=1s
RateLimitBurst=1000000
...

Parsing logs

syslogjd adds the following custom fields:

  • IPADDR - sender IP address (from the UDP socket)

  • TIMESTAMP - date/timestamp from the syslog message

RFC5424 messages are stored with additional fields:

  • HOSTNAME - hostname or IP address from the message

  • APPNAME - application or username

  • PROCID

  • MSGID

RFC5424โ€™s "NILVALUE" are stored as "-"

Parsing errors are stored with a special field: SYSLOGJD_INTERNAL = error

Extracting logs

Examples:

sudo journalctl --identifier syslogjd -f -o verbose
sudo journalctl --identifier syslogjd -f -o json-pretty

Filtering examples:

sudo journalctl --since "1 hour ago" IPADDR="1.2.3.4"
sudo journalctl --since "1 hour ago" IPADDR="1.2.3.4" APPNAME="kernel"

Security

  • syslogjd runs as nobody

  • in a systemd / seccomp sandbox

  • with capabilities bound to CAP_NET_BIND_SERVICE

  • hardened with PIE and RELRO

Contributing

Testing and PRs are welcome.

syslogjd's People

Contributors

federicoceratto avatar

Stargazers

 avatar

Watchers

 avatar  avatar

syslogjd's Issues

spec file missing (build_rpm fails)

Your documentation suggests running "nimble build_rpm" to build an rpm of syslogjd. However, the required spec file is not included in the repo.

PS: Docs also say there are no requirements other than journald. Well, your "morelogging" nim module seems to be required. Which does not have a nifty rpm build anyway.

PPS: If you'd provide binaries, e.g. via open build service https://build.opensuse.org/, I would not have created this issue ;)

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.