1
response

Hi,

I want to use buffer (disk and memory) before sending my data to a TCP syslog, for that I create 2 processors (diskBuffer and memoryBuffer) that I use in a route : IN => diskBuffer => memoryBuffer => out.

When i try to create another route with one or more different process but which also uses buffers (IN2 => P1 => P2 => diskBuffer => memoryBuffer => out), i have an error message on log :
2016-07-23 13:28:51 ERROR cannot add processor module 'diskBuffer' to route 'XXX' because it is already added to route 'YYYY'
2016-07-23 13:28:51 ERROR cannot add processor module 'memoryBuffer' to route 'XXX' because it is already added to route 'YYYY'

This concept is not really explain in the community documentation and suggest to think of the opposite with the example given in page 18 :
Example 4.14 Different routes
<Input in1>
    Module im_null
</Input>
<Input in2>
    Module im_null
</Input>
<Processor p1>
    Module pm_null
</Processor>
<Processor p2>
    Module pm_null
</Processor>
<Output out1>
    Module om_null
</Output>
<Output out2>
   Module om_null
</Output>
<Route 1>
    # no processor modules
    Path in1 => out1
</Route>
<Route 2>
    # one processor module
    Path in1 => p1 => out1
</Route>
<Route 3>
    # multiple modules
    Path in1, in2 => p1 => p2 => out1, out2
</Route>

We have the same error: 2016-07-23 13:36:09 ERROR cannot add processor module 'p1' to route '3' because it is already added to route '2'.

Why a processor is limited on one route ? Is it a bug or a mistake in documentation ?
I use the latest version of nxlog-ce : V2.9.1716.

Best regards

AskedJuly 23, 2016 - 3:40pm

Answer (1)

In earlier versions this was allowed and nxlog created a new instance for processor modules automatically when such a module was used in more than one route. Unfortunately this had some unwanted side-effects and didn't work well so this is now forbidden. You should define a separate instance for each processor that you want to use.

The documentation will be updated with the corrected example, thanks for pointing this out.