Hello LOG Support
How to configure multiple input files in this case?
<Input windowsfile>
Module im_file
File 'C:\Program Files (x86)\Skybot\Skybot Scheduler\logs' AND 'C:\Program Files (x86)\Skybot\Skybot Scheduler\pgsql\data\pg_log' = ?
SavePos TRUE
# ReadFromLast FALSE
Exec $Message = $raw_event;
</Input>
Multiple input files syntax
Re: Multiple input files syntax
You can use wildcards and the Recursisve(http://nxlog-ce.sourceforge.net/nxlog-d ... ml#im_file) directive to send multiple files using a single nxlog input config. It looks like the file directive only takes one argument though so if you cannot use wildcards to specify the filenames, you'd need to create an additional input in the nxlog config.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Multiple input files syntax
so should i use 2 x Input blocks or 2 x File entries?cdienger wrote:You can use wildcards and the Recursisve(http://nxlog-ce.sourceforge.net/nxlog-d ... ml#im_file) directive to send multiple files using a single nxlog input config. It looks like the file directive only takes one argument though so if you cannot use wildcards to specify the filenames, you'd need to create an additional input in the nxlog config.
<Input windowsfile>
Module im_file
File 'C:\Program Files (x86)\Skybot\Skybot Scheduler\logs'
SavePos TRUE
# ReadFromLast FALSE
Exec $Message = $raw_event;
</Input>
+
<Input windowsfile>
Module im_file
File 'C:\Program Files (x86)\Skybot\Skybot Scheduler\pgsql\data\pg_log'
SavePos TRUE
# ReadFromLast FALSE
Exec $Message = $raw_event;
</Input>
OR
<Input windowsfile>
Module im_file
File 'C:\Program Files (x86)\Skybot\Skybot Scheduler\logs'
File 'C:\Program Files (x86)\Skybot\Skybot Scheduler\pgsql\data\pg_log'
SavePos TRUE
# ReadFromLast FALSE
Exec $Message = $raw_event;
</Input>
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Multiple input files syntax
@dlukinski, Without testing it I'd say the first option should work. However, Input names have to be different. So if the first one is windowsfile, the second one can be windowsfile2.
You could post your questions regarding nxlog on their forums directly: https://nxlog.co/community-forum
You could post your questions regarding nxlog on their forums directly: https://nxlog.co/community-forum
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Multiple input files syntax
You would also need to modify your Route definition to include the additional Input name(s):
nxlog should give you a warning in its log file if you have a non-routed Input, though.
Code: Select all
<Route 1>
Path windowsfile, windowsfile2, ... windowsfilen => out
</Route>Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Multiple input files syntax
Thanks, @mcapra!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Multiple input files syntax
Thank you. all workedmcapra wrote:You would also need to modify your Route definition to include the additional Input name(s):
nxlog should give you a warning in its log file if you have a non-routed Input, though.Code: Select all
<Route 1> Path windowsfile, windowsfile2, ... windowsfilen => out </Route>
Please close the case