Search code examples
javavirtualboxgraylog2

Storing logs on Graylog


I have an application in Java/Groovy and a Virtual Machine Appliance of Graylog running on VirtualBox.

How can I "make the connection" to store my logs on Graylog?


Solution

  • Your are using this virtual machine. Assuming you need to create a new Graylog input and adapt the Logstash .conf to send logs with GELF:

    1. Go on the Graylog web interface
    2. Go in system/inputs section of the web interface
    3. create a GELF UDP input and give it a name
    4. Add the following line in your Logstash .conf, in the output section as follows:

      output {gelf {host => "my_VM_IP"}}

    5. Start your Logstash instance.

    6. Send a new log to Logstash.
    7. Search for the latest logs in the Graylog web interface to check that it was received.