Use two time Im_module

Tags:

#1 aiglonos

Hi

I try to use two time the input im_module to be sent two time to the local server but with two different port (used with PRTG)

But I get the error that the module is already used and I don't understand why.

Here the configuration file :

define ROOT C:\Program Files (x86)\nxlog define CERTDIR %ROOT%\cert define CONFDIR %ROOT%\conf define LOGDIR %ROOT%\data define LOGFILE %LOGDIR%\nxlog.log LogFile %LOGFILE%

Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data

<Extension _syslog> Module xm_syslog </Extension>

<Input Stamps> Module im_file File "C:\Program Files\timekeeper\var\log\timekeeper_stamps.log" SavePos TRUE

ReadFromLast TRUE

</Input> <Input Log> Module im_file File "C:\Program Files\timekeeper\var\log\timekeeper.log" SavePos TRUE

ReadFromLast TRUE

</Input>

<Output Stamps> Module om_udp Host 127.0.0.1 Port 1530 </Output> <Output Log> Module om_udp Host 127.0.0.1 Port 1531 </Output>

<Route Stamps> Path Stamps => Stamps </Route> <Route Log> Path Log => Log </Route>

Here the error :

2021-11-30 09:25:23 WARNING nxlog-ce received a termination request signal, exiting... 2021-11-30 09:25:25 ERROR module 'Stamps' is already defined at C:\Program Files (x86)\nxlog\conf\nxlog.conf:34 2021-11-30 09:25:25 ERROR module 'Log' is already defined at C:\Program Files (x86)\nxlog\conf\nxlog.conf:39 2021-11-30 09:25:25 ERROR route Stamps is not functional without output modules, ignored at C:\Program Files (x86)\nxlog\conf\nxlog.conf:45 2021-11-30 09:25:25 ERROR route Log is not functional without output modules, ignored at C:\Program Files (x86)\nxlog\conf\nxlog.conf:48 2021-11-30 09:25:25 WARNING no routes defined! 2021-11-30 09:25:25 WARNING not starting unused module Stamps 2021-11-30 09:25:25 WARNING not starting unused module Log 2021-11-30 09:25:25 INFO nxlog-ce-2.10.2150 started

Can you help me ?

#2 Gabor.SzidonyaDeactivated Nxlog ✓
#1 aiglonos
Hi I try to use two time the input im_module to be sent two time to the local server but with two different port (used with PRTG) But I get the error that the module is already used and I don't understand why. Here the configuration file : define ROOT C:\Program Files (x86)\nxlog define CERTDIR %ROOT%\cert define CONFDIR %ROOT%\conf define LOGDIR %ROOT%\data define LOGFILE %LOGDIR%\nxlog.log LogFile %LOGFILE% Moduledir %ROOT%\modules CacheDir %ROOT%\data Pidfile %ROOT%\data\nxlog.pid SpoolDir %ROOT%\data <Extension _syslog> Module xm_syslog </Extension> <Input Stamps> Module im_file File "C:\Program Files\timekeeper\var\log\timekeeper_stamps.log" SavePos TRUE ReadFromLast TRUE </Input> <Input Log> Module im_file File "C:\Program Files\timekeeper\var\log\timekeeper.log" SavePos TRUE ReadFromLast TRUE </Input> <Output Stamps> Module om_udp Host 127.0.0.1 Port 1530 </Output> <Output Log> Module om_udp Host 127.0.0.1 Port 1531 </Output> <Route Stamps> Path Stamps => Stamps </Route> <Route Log> Path Log => Log </Route> Here the error : 2021-11-30 09:25:23 WARNING nxlog-ce received a termination request signal, exiting... 2021-11-30 09:25:25 ERROR module 'Stamps' is already defined at C:\Program Files (x86)\nxlog\conf\nxlog.conf:34 2021-11-30 09:25:25 ERROR module 'Log' is already defined at C:\Program Files (x86)\nxlog\conf\nxlog.conf:39 2021-11-30 09:25:25 ERROR route Stamps is not functional without output modules, ignored at C:\Program Files (x86)\nxlog\conf\nxlog.conf:45 2021-11-30 09:25:25 ERROR route Log is not functional without output modules, ignored at C:\Program Files (x86)\nxlog\conf\nxlog.conf:48 2021-11-30 09:25:25 WARNING no routes defined! 2021-11-30 09:25:25 WARNING not starting unused module Stamps 2021-11-30 09:25:25 WARNING not starting unused module Log 2021-11-30 09:25:25 INFO nxlog-ce-2.10.2150 started Can you help me ?

Hi,

Please try to use separate names for all modules. In your configuration there are Stapms and Log names only. The system identifies the modules by the name, and it cannot make difference between the Stamps input and output modules or the Log input and output mudules in the routing. I suggest to use the names 'Stampsin' for the input and 'Stampsout' for the output. (Same for Log). The routing names could be Stampsroute and Logroute.

Regards, Gábor