LibLogging 1.0.4 released

liblogging 1.0.4 [download]

We have released liblogging 1.0.4.

This release has lower build system requirements to autoconf, introduces a configuration switch to turn of man page handling and fixes some build problems on some platforms.

sha256sum: aceb5d2aa8bdc771ff66f407f9adf4176b654db63e34a8605795b68be537b81c

—————————————————————————-
v1.0.4 2014-04-03
– fix build problems on some platforms (namely RHEL/CENTOS 5)
– add –disable-man pages ./configure option
  This permits to totally turn off man page handling. This is useful for
  platforms like RHEL/CENTOS 5 where rst2man is hard to get when building
  from git is desired.
– lower build system requirements to autoconf 2.59
  This permits building on RHEL/CENTOs 5 with stock autotools.

rsyslog 8.2.0 (v8-stable) released

This is the first release of the greatly improved version 8 of rsyslog. Large parts of the core engine have been rewritten in order to support even greater performance and newly things like global variable support in RainerScript. The new engine is the foundation for the next couple of years of rsyslog technology. As another major design feature, an interface for external plugins has been added. Version 8.2 supports external output plugins, but external message modification and input plugins are also schedule to appear soon.
With the release of version 8, 7.6 is being as officially supported stable. However, we will support 7.6 for some while. So there is no urgent need to upgrade to v8.
ChangeLog:

http://www.rsyslog.com/changelog-for-8-2-0-v8-stable/

Download:

http://www.rsyslog.com/downloads/download-v8-stable/

As always, feedback is appreciated.

Best regards,
Florian Riedl

Changelog for 8.2.0 (v8-stable)

Version 8.2.0 [v8-stable] 2014-04-02
This starts a new stable branch based on 8.1.6 plus the following changes:

  • we now use doc from the rsyslog-doc project
    As such, the ./doc subtree has been removed. Instead, a cache of the rsyslog-doc project’s files has been included in ./rsyslog-doc.tar.gz. Note that the exact distribution mode for the doc is still under discussion and may change in future releases. This was agreed upon on the rsyslog mailing list. For doc issues and corrections, be sure to work with the rsyslog-doc project. It is currently hosted at https://github.com/rsyslog/rsyslog-doc
  • add support for specifying the liblogging-stdlog channel spec
    new global parameter “stdlog.channelspec”
  • add “defaultnetstreamdrivercertfile” global variable to set a default for the certfile.
    Thanks to Radu Gheorghe for the patch.
  • omelasticsearch: add new “usehttps” parameter for secured connections
    Thanks to Radu Gheorghe for the patch.
  • “action resumed” message now also specifies module type which makes troubleshooting a bit easier. Note that we cannot output all the config details (like destination etc) as this would require much more elaborate code changes, which we at least do not like to do in the stable version.
  • add capability to override GnuTLS path in build process
    Thanks to Clayton Shotwell for the patch
  • better and more consistent action naming, action queues now always contain the word “queue” after the action name
  • bugfix: ompipe did resume itself even when it was still in error
    See: https://github.com/rsyslog/rsyslog/issues/35
    Thanks to github user schplat for reporting

rsyslog 7.6.3 (v7-stable) released

This release offers a couple of bug-fixes and also supports better interaction with librelp 1.2.5, which in turn supports anonymous TLS on platforms like CENTOS/RHEL 6 where GnuTLS is too old and RELP TLS was completely disable previously.

ChangeLog:

http://www.rsyslog.com/changelog-for-7-6-3-v7-stable/

Download:

http://www.rsyslog.com/downloads/download-v7-stable/

As always, feedback is appreciated.

Best regards,
Florian Riedl

Changelog for 7.6.3 (v7-stable)

Version 7.6.3 [v7.6-stable] 2014-03-27

  • add capability to override GnuTLS path in build process
    Thanks to Clayton Shotwell for the patch
  • support for librelp 1.2.5
    Support new return states of librelp 1.2.5 to emit better error messages. For obvious reasons, librelp 1.2.5 is now required.
  • bugfix: ompipe used invalid default template
    This is a regression from an old change (didn’t track it down precisely, but over a year ago). It used the Forwarding template instead of the file template (so we have a full syslog header). This fix corrects it back to previous behaviour, but new scripts that used the wrong format may now need to have the RSYSLOG_ForwardingFormat template explicitely be applied.
    closes: https://github.com/rsyslog/rsyslog/issues/50
  • bugfix: ompipe did emit many suspension messages for /dev/xconsole
    (hopefully now) closes: https://github.com/rsyslog/rsyslog/issues/35
    When it was present, but nobody reading from it. The problem is the way the rsyslog v7 engine tries to resolve failures in outputs. It does some retries, and along those lines some state information gets lost and it is close to impossible to retain it. However, the actual root problem is that ompipe does not reliably detect if it is able to recover. The problem here is that it actually does not know this before it does an actual write. These two things together mess up the logic that suppresses invalid resumption/suspension messages (actually, the plugin switches state really that often). Nevertheless, the prime problem with /dev/xconsole (and probably most other pipes as well) is that it gets full. So I have now added code that checks, during resume processing, if the pipe is writable. If it is not, resume is deferred. That should address the case.

Performance Tuning&Tests for the Elasticsearch Output

Original post: Rsyslog 8.1 Elasticsearch Output Performance by @Sematext

Version 8 brings major changes in rsyslog’s core – see Rainer’s presentation about it for more details. Those changes should give outputs better performance, and the Elasticsearch one should benefit a lot. Since we’re using rsyslog and Elasticsearch in Sematext‘s own log analytics product, Logsene, we had to take the new version for a spin.

The Weapon and the Target

For testing, we used a good-old i3 laptop, with 8GB of RAM. We generated 20 million logs, sent them to rsyslog via TCP and from there to Elasticsearch in the Logstash format, so they can get explored with Kibana. The objective was to stuff as many events per second into Elasticsearch as possible.

Rsyslog Architecture Overview

In order to tweak rsyslog effectively, one needs to understand its architecture, which is not that obvious (although there’s an ongoing effort to improve the documentation). The gist of it its architecture represented in the figure below.

  • you have input modules taking messages (from files, TCP/UDP, journal, etc.) and pushing them to a main queue
  • one or more main queue threads take those events and parse them. By default, they parse syslog formats (RFC-3164, RFC-5424 and various derivatives), but you can configure rsyslog to use message modifier modules to do additional parsing (e.g. CEE-formatted JSON messages). Either way, this parsing generates structured events, made out of properties
  • after parsing, the main queue threads push events to the action queue. Or queues, if there are multiple actions and you want to fan-out
  • for each defined action, one or more action queue threads takes properties from events according to templates, and makes messages that would be sent to the destination. In Elasticsearch’s case, a template should make Elasticsearch JSON documents, and the destination would be the REST API endpoint

rsyslog message flow

There are two more things to say about rsyslog’s architecture before we move on to the actual test:

  • you can have multiple independent flows (like the one in the figure above) in the same rsyslog process by using rulesets. Think of rulesets as swim-lanes. They’re useful for example when you want to process local logs and remote logs in a completely separate manner
  • queues can be in-memory, on disk, or a combination called disk-assisted. Here, we’ll use in-memory because they’re the fastest. For more information about how queues work, take a look here

Configuration

To generate messages, we used tcpflood, a small and light tool that’s part of rsyslog’s testbench. It generates messages and sends them over to the local syslog via TCP.

Rsyslog took received those messages with the imtcp input module, queued them and forwarded them to Elasticsearch 0.90.7, which was also installed locally. We also tried with Elasticsearch 1.0 and got the same results (see below).

The flow of messages in this test is represented in the following figure:

Flow of messages in this test

The actual rsyslog config is listed below (in the new configuration format). It can be tuned further (for example by using the multithreaded imptcp input module), but we didn’t get significant improvements in this particular scenario.

module(load="imtcp")   # TCP input module
module(load="omelasticsearch") # Elasticsearch output module

input(type="imtcp" port="13514")  # where to listen for TCP messages

main_queue(
  queue.size="1000000"   # capacity of the main queue
  queue.dequeuebatchsize="1000"  # process messages in batches of 1000 and move them to the action queues
  queue.workerthreads="2"  # 2 threads for the main queue
)

# template to generate JSON documents for Elasticsearch in Logstash format
template(name="plain-syslog"
         type="list") {
           constant(value="{")
             constant(value="\"@timestamp\":\"")      property(name="timereported" dateFormat="rfc3339")
             constant(value="\",\"host\":\"")        property(name="hostname")
             constant(value="\",\"severity\":\"")    property(name="syslogseverity-text")
             constant(value="\",\"facility\":\"")    property(name="syslogfacility-text")
             constant(value="\",\"syslogtag\":\"")   property(name="syslogtag" format="json")
             constant(value="\",\"message\":\"")    property(name="msg" format="json")
             constant(value="\"}")
         }

action(type="omelasticsearch"
       template="plain-syslog"  # use the template defined earlier
       searchIndex="test-index"
       bulkmode="on"                   # use the Bulk API
       queue.dequeuebatchsize="5000"   # ES bulk size
       queue.size="100000"   # capacity of the action queue
       queue.workerthreads="5"   # 5 workers for the action
       action.resumeretrycount="-1"  # retry indefinitely if ES is unreachable
)

You can see from the configuration that:

  • both main and action queues have a defined size in number of messages
  • both have number of threads that deliver messages to the next step. The action needs more because it has to wait for Elasticsearch to reply
  • moving of messages from the queues happens in batches. For the Elasticsearch output, the batch of messages is sent through the Bulk API, which makes queue.dequeuebatchsize effectively the bulk size

Results

We started with default Elasticsearch settings. Then we tuned them to leave rsyslog with a more significant slice of the CPU. We monitored the indexing rate with SPM for Elasticsearch. Here are the average results over 20 million indexed events:

  • with default Elasticsearch settings, we got 8,000 events per second
  • after setting Elasticsearch up more production-like (5 second refresh interval, increased index buffer size, translog thresholds, etc), and the throughput went up to average of 20,000 events per second
  • in the end, we went berserk and used in-memory indices, updated the mapping to disable any storing or indexing for any field, to have Elasticsearch do as little work as possible and make room for rsyslog. Got an average of 30,000 events per second. In this scenario, rsyslog was using between 1 and 1.5 of the 4 virtual CPU cores, with tcpflood using 0.5 and Elasticsearch using from 2 to 2.5

Conclusion

20K EPS on a low-end machine with production-like configuration means Elasticsearch is quick at indexing. This is very good for logs, where you typically have lots of messages being generated, compared to how often you search.

If you need some tool to ship your logs to Elasticsearch with minimum overhead, rsyslog version 8 may well be your best bet.

Related posts:

librelp 1.2.5

librelp 1.2.5 [download]

This version of librelp allows to use anonymous TLS on platforms where GnuTLS misses certificate verification function. This permits to use at least anon TLS on platforms like RHEL and CENTOS 6.

———————————————————————-
Version 1.2.5 – 2014-03-20
– permit to use anonymous TLS on platforms where GnuTLS misses
certificate verification function. This permits to use at least
anon TLS on platforms like RHEL and CENTOS 6.


sha256sum: 358b2de82c9aebd4efcbab5e1ff212477fb8fa89543dbeded61aa46a23dcf12b

LibLogging 1.0.3 released

liblogging 1.0.3 [download]

We have released liblogging 1.0.3.

This is a pure bug-fixing release fixing some build problems and clarifying part of the API.

sha256sum: c9da7e4e01c0912085e9393dfb9d59bbd355c80a4ac5484d78bbfdfa91d011c0

v1.0.3 2014-03-18
– fix build problem in Ubuntu 10.04
  Thanks to Assaf Gordon for reporting
  See: https://github.com/rsyslog/liblogging/issues/11
– do not override user varibale CFLAGS
  Thanks to Thomas D. for reporting this problem and suggesting a solution.
  closes: https://github.com/rsyslog/liblogging/issues/15
– make liblogging-rfc3195 not export private symbols
  Thanks to Michael Biebl for his help in getting this right.
– explain that stdlog_log() return code usually most not be checked
  (if same level of reliability like syslog(3) is desired)

rsyslog 7.6.2 (v7-stable) released

This version introduces the support for librelp 1.2.4, thus it it fixes a problem with librelp in the last release.

 

Note that now librelp 1.2.4 is required as we process it’s new error codes emitted when librelp does not support TLS.

 

ChangeLog:

http://www.rsyslog.com/changelog-for-7-6-2-v7-stable/

Download:

http://www.rsyslog.com/downloads/download-v7-stable/

As always, feedback is appreciated.

Best regards,
Florian Riedl

Scroll to top