Skipping first X lines (im_file)

Tags:

#1 Lorenzo.Henriquez

Hello all,

I'm using the im_file module to send log files to my logging server (graylog).  I'd like it to always skip the firts few lines of newly opened files.  Is this possible?  I couldn't find anything in the documentation.

#2 b0ti Nxlog ✓
#1 Lorenzo.Henriquez
Hello all, I'm using the im_file module to send log files to my logging server (graylog).  I'd like it to always skip the firts few lines of newly opened files.  Is this possible?  I couldn't find anything in the documentation.

If there is a header you could skip those lines with a regular expression and `drop()`.

The NXLog EE beta has a function called record_number() that could be used as well to skip the first few lines.