Hi Kostya,

the string {subs=57, devs=34} isn't valid JSON. The JSON extractor will 
only work with a valid JSON payload.

Cheers,
Jochen

On Thursday, 25 August 2016 15:14:38 UTC+2, Kostya Vasilyev wrote:
>
> Hi,
>
> I'm new to Graylog, so far so good, but ran into an issue trying to use 
> the JSON extractor.
>
> I've got an http / JSON input configured, and my data does get picked up 
> fine, looks like this in the input's message list:
>
> message
> JSON API poll result: $['objs'] -> {result={subs=57, devs=34}}
> result
> {subs=57, devs=34}
> source
> stats_objs
> timestamp
> 2016-08-25T12:58:49.821Z
>
> Now I'd like to promote the values of "subs" and "devs" into properties of 
> each message (event) so I can do charts, etc.
>
> If I go into "New JSON extractor" it picks up an example message, looks 
> like below.
>
> Now the issue:
>
> I would expect that the extractor be able to pick up the values of "subs" 
> and "devs" and to add those as properties of my messages.
>
> And yet this does not seems to happen, also when I click "Try" on the 
> extractor settings screen, I get "Nothing will be extracted". Tried to 
> enable flattening, no change.
>
> Am I missing something or does the JSON extractor just plain not work?
>
> Almost sure it's the former, I'm just not doing it right, so what's the 
> trick?
>
> Thanks,
> -- K
>
> Example message
> {subs=57, devs=34}
>
> Wrong example? You can load another message.
> Extractor configuration
> Extractor type
>
> JSON
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to graylog2+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/9a0e118e-0ab3-40d4-9591-256059c4cd64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to