Discussion:
[graylog2] json extractor help
Rayees Namathponnan
2017-02-15 22:24:26 UTC
Permalink
Hi All,

Is there any details doc for Json extractor ? i looked “http://docs.graylog.org/en/2.1/pages/extractors.html#using-the-json-extractor <http://docs.graylog.org/en/2.1/pages/extractors.html#using-the-json-extractor>” but not helping


I want to extract from data like below, not sure how to do this,


[{"path": “/test/test3/midm_new/20160912", "tag": "MidmRaw", "stats": {"size": "2.27TB"}}, {"path": "/proce/test2/parse//cil/latest", "tag": "cil", "stats": {"size": "645.83MB"}}]




Regards,
Rayees
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/C86C487B-8C77-4504-9E1C-0DEC7C94DC59%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jochen Schalanda
2017-02-16 08:57:27 UTC
Permalink
Hi Rayees,

What are you trying to accomplish?
What did you try so far?
What did you expect and what was the actual result?

Cheers,
Jochen
Post by Rayees Namathponnan
Hi All,
Is there any details doc for Json extractor ? i looked “
http://docs.graylog.org/en/2.1/pages/extractors.html#using-the-json-extractor”
but not helping
I want to extract from data like below, not sure how to do this,
"cil", "stats": {"size": "645.83MB"}}]
Regards,
Rayees
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/7cb5e8df-9717-48ca-85a4-b0d9262ac2aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rayees Namathponnan
2017-02-16 14:05:28 UTC
Permalink
The message you are seeing below is extracted from log, i did this by using regular expression extractor and store as “Input"

[{"path": “/test/test3/midm_new/20160912", "tag": "MidmRaw", "stats": {"size": "2.27TB"}}, {"path": "/proce/test2/parse//cil/latest", "tag": "cil", "stats": {"size": "645.83MB"}}]


From this result, want to apply one more extractor to get below values, at the end can have search and identify how much size consumed for each tag


i) TAG : MidRaw and Size 2.27 TB
ii) TAG: cil and Size 645.83MB

This is Json list and it may more more than two, i tried to apply Json extractor on this, but not working is it because these are Json Array list ??? how about using Grok pattern extractor ?


Regards,
Rayees
Post by Jochen Schalanda
Hi Rayees,
What are you trying to accomplish?
What did you try so far?
What did you expect and what was the actual result?
Cheers,
Jochen
Hi All,
Is there any details doc for Json extractor ? i looked “http://docs.graylog.org/en/2.1/pages/extractors.html#using-the-json-extractor <http://docs.graylog.org/en/2.1/pages/extractors.html#using-the-json-extractor>” but not helping
I want to extract from data like below, not sure how to do this,
[{"path": “/test/test3/midm_new/20160912", "tag": "MidmRaw", "stats": {"size": "2.27TB"}}, {"path": "/proce/test2/parse//cil/latest", "tag": "cil", "stats": {"size": "645.83MB"}}]
Regards,
Rayees
--
You received this message because you are subscribed to the Google Groups "Graylog Users" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/7cb5e8df-9717-48ca-85a4-b0d9262ac2aa%40googlegroups.com <https://groups.google.com/d/msgid/graylog2/7cb5e8df-9717-48ca-85a4-b0d9262ac2aa%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/B33D8FF9-0FAD-45D6-A3F0-A31A94B66DF4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...