Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mmgrok package #26

Open
radu-gheorghe opened this issue Jun 22, 2016 · 7 comments
Open

mmgrok package #26

radu-gheorghe opened this issue Jun 22, 2016 · 7 comments
Assignees
Milestone

Comments

@radu-gheorghe
Copy link

mmgrok readme can be found here: https://github.com/rsyslog/rsyslog/tree/master/contrib/mmgrok

One can find so many grok rules all over the Internet that it sounds very tempting for a lot of use-cases,
especially those with few rules.

@friedl
Copy link
Contributor

friedl commented Nov 10, 2017

Is this still of interest?

In the Readme it says

This plugin requires json-c, glib2, and grok packages.

Does it also work with libfastjson instead of json-c?

@radu-gheorghe
Copy link
Author

Eh, too bad that it requires json-c. I don't know if it works with libfastjson. I think it would be nice to have mmgrok easily available in rsyslog, as people can then translate parsing tutorials from Logstash and the like. Which will hopefully help with rsyslog adoption in general.

So from that perspective it's definitely of interest. That said, when I opened this issue I needed to make some rules work for both Logstash and rsyslog, but that is now stopped or at least on hold. However, if I can help drive this forward (e.g. by checking if it works with libfastjson), I think it would be good for everyone, so please let me know.

@davidelang
Copy link

davidelang commented Nov 10, 2017 via email

@rgerhards
Copy link
Member

rgerhards commented Nov 10, 2017 via email

@rgerhards
Copy link
Member

Yup, see rsyslog/rsyslog#2015

@friedl no issue as far as libfastjson is concerned. Would also like to see this package.

@radu-gheorghe
Copy link
Author

Heh, that's quite funny, that it compiles with libfastjson and it crashes with json-c :) Thanks for your input, Rainer!

@rgerhards
Copy link
Member

Actually, the reason is quite easy (and now on a real keyboard quickly to explain): mmgrok passes the json structure to a rsyslog API, and that API expects a libfastjson object. The json-c one is considerably different (memory layout), so it will segfault sooner or later. I think mmgrok was contributed when we used json-c and the README never updated after the change.

API-wise, mmgrok doesn't care if it is json-c or libfastjson.

@rgerhards rgerhards added this to the v8.31.0 milestone Nov 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants