NXlog Input to Track Rotated Log Files

Tags:

#1 George.Townson

I have an input for some log files, however each restart of the machine the log file is rotated to a new file.

I'm trying to create an input that is able to track the rotated log file. I presume a wildcard can be used in the File: string and that the save position and read from last wouldnt cause NXlog to re read old files?

Below you can see the example file path with the 'X' representing a number that changes each time the active log is rotated.

C:\ProgramData\VMware\hostd\hostd-X.log

 

Regards,

G

#2 b0ti Nxlog ✓
#1 George.Townson
I have an input for some log files, however each restart of the machine the log file is rotated to a new file. I'm trying to create an input that is able to track the rotated log file. I presume a wildcard can be used in the File: string and that the save position and read from last wouldnt cause NXlog to re read old files? Below you can see the example file path with the 'X' representing a number that changes each time the active log is rotated. C:\ProgramData\VMware\hostd\hostd-X.log   Regards, G

You are correct,. All you'd need in the config is to add an asterisk to the filename:

File 'C:\ProgramData\VMware\hostd\hostd-*.log'