Search code examples
dockervagrantgraylog

How to send log from Vagrant server to Graylog server


I'm quiet newbie with such problems, however I have to send log data from Vagrant server to my local machine where Graylog is installed. I have on my local machine docker tools installed where graylog, mongo and elasticsearch is up and running. Elasticsearch will be used to search specific logs. I have logs on first machine (Vagrant) and want to send them to another machine (where is graylog). Do you, guys, have some step by step tutorial or some hints, or etc.? I stuck with this issue and have no idea how to step further...


Solution

  • OK, I've got the solution. I needed just sending data to my graylog server and open port on graylog (Kitematic is great tool to see what's wrong with docker configuration i.e. ports). I sent logs by writing data to /dev/udp file like below:

    cd /home/iso/myAppFolder/myAppLogs; tail -f myAppLogs.log | grep totalTime > /dev/udp/[ip of my graylog]/[port] &