GithubHelp home page GithubHelp logo

alexferl / tinysyslog Goto Github PK

View Code? Open in Web Editor NEW
46.0 3.0 14.0 1.42 MB

A tiny and simple syslog server with log rotation in Go. Works with Docker and Kubernetes.

Home Page: https://hub.docker.com/r/admiralobvious/tinysyslog/

License: MIT License

Go 93.97% Dockerfile 1.35% Makefile 4.68%
syslog-server log-rotation syslog tiny lumberjack go-syslog rfc5424 logging go golang

tinysyslog's Issues

Regex filter not being loaded correctly?

The grok pattern seems to load:

# docker run --rm --name tinysyslog -p 2514:5140/udp admiralobvious/tinysyslog --log-level debug --filter-grok-pattern test --filter grok
time="2020-01-31T00:34:39Z" level=info msg="tinysyslog starting"
time="2020-01-31T00:34:39Z" level=debug msg="Using mutator type 'text'"
time="2020-01-31T00:34:39Z" level=debug msg="Using filter type 'grok' with pattern 'test'"
time="2020-01-31T00:34:39Z" level=debug msg="Adding sink type 'console'"
time="2020-01-31T00:34:39Z" level=info msg="tinysyslog listening on 0.0.0.0:5140"

But it doesn't look like the regex filter does:

# docker run --rm --name tinysyslog -p 2514:5140/udp admiralobvious/tinysyslog --log-level debug --filter-regex test --filter regex
time="2020-01-31T00:36:52Z" level=info msg="tinysyslog starting"
time="2020-01-31T00:36:52Z" level=debug msg="Using mutator type 'text'"
time="2020-01-31T00:36:52Z" level=debug msg="Using filter type 'regex' with filter ''"
time="2020-01-31T00:36:52Z" level=debug msg="Adding sink type 'console'"
time="2020-01-31T00:36:52Z" level=info msg="tinysyslog listening on 0.0.0.0:5140"

I'm not super sure, but it looks like maybe this line needs changed from filter-regex-filter to filter-regex?

https://github.com/admiralobvious/tinysyslog/blob/eae33b359fe126cbcc53635394f197fc326ec0ab/factories.go#L43

Mikrotik logs display as blank

Hi,

Syslogs from Mikrotik routers show like this:

tinysyslog  | time="2024-01-21T20:37:53Z" level=info msg="tinysyslog listening on 0.0.0.0:5140"
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 
tinysyslog  | Jan  1 00:00:00  []: 

A tcpdump of the UDP packet shows that it does contain the log message.

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.