Sending entire folders of random text files to Graylog


#1

I have an app (on Centos 7) that creates text logs in a format like this:

/usr/bin/app/logs/2018-11-15/job-290393.log
/usr/bin/app/logs/2018-11-15/job-293834.log
/usr/bin/app/logs/2018-11-14/job-283737.log
/usr/bin/app/logs/2018-11-13/job-273849.log

So… what is the easiest way to recursively send an entire folder of random text files to Graylog?

Anyone had any luck in this situation? How did you approach it? Using scripts and the logger command? Or maybe rsyslog and the imfile module?

Any tips would be appreciated! Thanks in advance!


(Jan Doberstein) #2

I personal would use filebeat to read and send the logfiles. But if that is a suitable solution for you depends on your network setup.


#3

Hmmm… filebeat can handle an entire folder of random text files? Thanks Jan I will check it out.


(Eric Capuano) #4

Jan is correct but an even simpler method would be to just pipe them to a UDP listener for the time being cat ./*.log | ncat your.graylog.server 1514

been a few since I’ve done it, but worked well enough for a group of files.


(system) #5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.