Coder Social home page Coder Social logo

Comments (5)

trink avatar trink commented on July 18, 2024

You have to specify the proper template in your cfg; in this case ForwardFormat see https://rsyslog-5-8-6-doc.neocities.org/rsyslog_conf_templates.html.

template= "<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%"

The default is TraditionalForwardFormat

from lua_sandbox_extensions.

cvuillemez avatar cvuillemez commented on July 18, 2024

Template is still defined in /usr/share/luasandbox/io_modules/decoders/syslog.lua at line #38 (for Ubuntu, this file is provided by deb package lua-sandbox-extensions 0~git20161128-1) :
local template = read_config("template") or "<%PRI%>%TIMESTAMP% %HOSTNAME% %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%"

So it's not the root cause.
Thanks.

from lua_sandbox_extensions.

cvuillemez avatar cvuillemez commented on July 18, 2024

@trink can you re-open this issue ?

from lua_sandbox_extensions.

trink avatar trink commented on July 18, 2024

?? I am unclear on what the perceived problem is (the above reference is to a PR that was not accepted). The current packages and cfg work as expected as per https://mozilla-services.github.io/lua_sandbox_extensions/syslog/io_modules/decoders/syslog.html

from lua_sandbox_extensions.

cvuillemez avatar cvuillemez commented on July 18, 2024

OK I pointed the mistake. My test message doesn't match the default template, and I test different templates format, but I put them in wrong place in configuration file:

filename = "tcp.lua"
address = "*"
decoder_module = "decoders.syslog"
send_decode_failures = true
decoders_syslog = { 
  template = "<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%",
}

Template is well apllied with this config:

filename = "tcp.lua"
address = "*"
decoder_module = "decoders.syslog"
send_decode_failures = true
template = "<%PRI%>%TIMESTAMP:::date-rfc3339% %HOSTNAME% %syslogtag:1:32%%msg:::sp-if-no-1st-sp%%msg%"

So payload parsing is ok. Sorry for the mistake.

Note: the reference #38 is not a reference, i juste wanted to write "line 38" !

from lua_sandbox_extensions.

Related Issues (20)

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.