Start your 14-day free trial today & Get 20% Off All Annual Managed ELK Plans

No Credit Card Required

Try Logit.io Free

Already have an account? Sign In

Send data via GELF to your Logstash instance provided by Logit.io

GELF

Ship logs using GELF to Logstash

Configure Gelf logs to automatically send to Logstash & Elasticsearch for further log analysis with our config example below.

Step 1 - Send data to GELF inputCopy

Sending the log to logstash with netcat

echo '{"test_version": "1.1","test_host":"example.org","short_message":"A short message that helps you identify what is going on","test_level":1,"user_id":9001,"some_info":"foo","some_env_var":"bar"}' | gzip | nc -u -w 1 your-logstash-host your-port

Step 2 - View dataCopy

Take a look in your kibana for your message, note UDP doesnt guarantee delivery

Step 3 - GELF Logstash OverviewCopy

GELF (also known as Graylog Extended Log Format) is a convenient log format that was originally created to provide an alternative to using Syslog. This was done to close the gap between logging in an unstructured format versus the more easily processable structured logging format.

GELF uses a simple JSON string to send structured log messages and application data. Gelf also assists in combating the additional shortcomings that become apparent when using plain Syslog. As plain Syslog is limited to a length of 1024 bytes there is very little remaining space left for backtraces and other payloads.

Due to its support for structured logging, GELF is highly suitable for custom APM setups. GELF log messages contain the following data fields; host, timestamp, version, long and short messages and also provides support for custom fields that can be configured as required.

If you need any additional assistance in sending GELF logs to Logstash we're here to help, simply get in touch by reaching out to the support team via live chat and we’ll be happy to help you get started with sending logs and application data.

Toggle View

Expand View

Return to Search