Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was just reading the GELF spec as I'm integrating it into our system. I was just wondering if an additional/custom field can contain a JSON object as the spec doesn't mention it:

So my GELF output (in particular the _request field below) would look something like:

  "version": "1.0",
  "host": "www1",
  "short_message": "Short message",
  "full_message": "Backtrace here\n\nmore stuff",
  "timestamp": 1291899928,
  "level": 1,
  "facility": "payment-backend",
  "file": "/var/www/somefile.rb",
  "line": 356,
  "_request": {
      "ip": "",
      "url": "",
      "method": "get",
      "referer" ""
share|improve this question
up vote 2 down vote accepted

Currently GELF doesn't support nested JSON objects however if anyone is interested please comment at!topic/graylog2/Xg3v3Qh8fmo.

share|improve this answer

I think it is better to avoid such nested structures, it will just complicate things. You can flatten it out and put this into the JSON instead:

share|improve this answer
I had considered this however for complex stack traces it would make sense to include it as a JSON object and would make it much simpler to read. So I was wondering if the GELF standard allows for this? I'm not a Graylog2 user so I'm not sure if it even supports it but I did want to make my application compatible. – Sean Bannister Feb 25 '12 at 5:43
Hey Sean, please post this as a suggestion on the Graylog2 mailing list, so we can discuss this! – Lennart Mar 9 '12 at 14:45
@Lennart Cheers, posted it at!topic/graylog2/Xg3v3Qh8fmo – Sean Bannister Mar 10 '12 at 12:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.