0

Is there any way that I can send a bunch of existing log files (json content) to graylog? I found few posts googling, but all deal with sending live data to graylog, and unable to find any instructions on how to send existing log file

zeroweb
  • 2,612
  • 4
  • 22
  • 34

1 Answers1

3

There are various options for sending existing log messages (text files) to Graylog.

The most basic option to send line-delimited log messages (i. e. not multiline) would be to create a Raw/Plaintext TCP input and send the complete file using something like netcat (nc, netcat, ncat, socat, etc.).

# Raw/Plaintext TCP on port 5555/tcp
$ nc graylog.example.org 5555 < /path/to/file

If you like it a bit more fancy (with some preprocessing of the log file and buffering of log messages), you could create a Beats input and use Filebeat to send the file.

joschi
  • 12,746
  • 4
  • 44
  • 50