Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
zeromq input and output modules for rsyslog
C
Branch: rsyslog6
Pull request Compare This branch is 10 commits ahead of master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
imzeromq
omzeromq
.gitignore
COPYING
COPYING.LESSER
README.markdown
rsyslog-zeromq.patch

README.markdown

rsyslog-zeromq

ZeroMQ input and output modules for rsyslog.

NOTE - WORK IN PROGRESS TO CONVERT TO rsyslog v6 ...

This module allows rsyslog to read and write ZeroMQ messages.

Installing rsyslog-zeromq

Tested with rsyslog-devel (v6-devel).

  1. Install zeromq, will need headers and devel libraries ...

  2. Apply the patch 'rsyslog-zeromq.patch' to the source of rsyslog:

    cd path/to/rsyslog-devel
    patch -p1 -i rsyslog-zeromq.patch
    
  3. Copy imzeromq and omzeromq directories to plugins directory of rsyslog source.

    rsync -av {i,o}mzeromq path/to/rsyslog-devel/plugins
    
  4. Regenerate autotools related files:

    cd path/to/rsyslog-devel
    autoreconf
    
  5. Add '--enable-imzeromq' and '--enable-omzeromq' to ./configure switches.

    ./configure \
    --enable-imzeromq \
    --enable-omzeromq \
    <your-other-flags-here>
    
  6. Build and install.

    cd path/to/rsyslog-devel
    make
    make install
    

Configuring the output module (omzeromq)

The :omzeromq: selector takes the following parameter components:

  • connect=<endpoint> Connect to the specified endpoint.
  • bind=<endpoint> Bind to the specified endpoint.
  • identity=<identstr> Sets the identity of the socket.
  • hwm=<NNN> Sets the high water mark of the socket.
  • swap=<NNN> Sets the swap value for the socket.
  • threads=<N> Sets the number of zeromq context threads.
  • pattern=<patternstr> Sets the messaging pattern (push or pub).

The format for the selector may be specified in the standard way with a trailing ";<FORMAT>" specifier.

Examples:

    $ModLoad omzeromq.so

    # Minimal configuration:
    *.* :omzeromq:bind=tcp://*:5557

    # Full config, all parameters specified:
    *.* :omzeromq:bind=tcp://*:5557,hwm=1000,swap=9999,identity=foobar,threads=1;RSYSLOG_ForwardFormat

Configuring the input module (imzeromq)

The $InputZeroMQServerRun directive takes the following parameter components:

  • connect=<endpoint> Connect to the specified endpoint.
  • bind=<endpoint> Bind to the specified endpoint.
  • identity=<identstr> Sets the identity of the socket.
  • pattern=<patternstr> Sets the messaging pattern (pull or sub).
  • subscribe=<filterstr> Sets a subscription filter.

Examples:

    $ModLoad imzeromq.so

    $RuleSet Events

    ... ruleset definition here ...

    # Provides ZeroMQ reception on a PULL socket.
    $InputZeroMQServerBindRuleset Events1
    $InputZeroMQServerRun  pattern=pull,connect=tcp://*:5557,identity=yoyo

    # Subscribe to all records from a SUB socket (empty filter string)
    $InputZeroMQServerBindRuleset Events2
    $InputZeroMQServerRun  pattern=sub,connect=tcp://*:5557,subscribe=,

    # Subscribe to just "foo" and "bar" records.
    $InputZeroMQServerBindRuleset Events3
    $InputZeroMQServerRun  pattern=sub,connect=tcp://*:5557,subscribe=foo,subscribe=bar
Something went wrong with that request. Please try again.