> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Miloslav Trmac
> Sent: Monday, September 03, 2012 6:49 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] status (especially JSON/mongodb)
> 
> Hello,
> ----- Original Message -----
> > quick update: I have just committed the ability to pass the JSON
> > object natively to output modules in v7-devel. This permits to
> > preserve types. Full subtrees can be passed by simply specifying the
> > root of that subtree. To add all data, simply use "!".
> 
> I don't think the current code can do it - msgCEEPropJSON always runs
> > *pjson = json_object_object_get(parent, (char*)leaf);
> choosing a subobject.

Sorry, my fault, I overlooked the border case. It's a trivial bugfix, I'll 
probably apply it but will run checks later (I am deep in the middle of the 
ruleengine work, where I don't like to stop).

> 
> Also, looking at tplToJSON, it seems that even if the above worked, it
> wouldn't be possible to pass the full JSON object in the root of the
> structure, only in a subobject
> (i.e.
> > @cee: { "foo": "bar" }
> could be stored in MongoDB as
> > { "all": "{ foo": "bar" }}
> but not as
> > { "foo": "bar" }
> 
> Have I misread the code?
> 
I need to check as well, but i fit does not work, that's a bug. I specifically 
added code to merge json objects to support that case. For subobjects, that 
performs well, but maybe there is a problem with the root.
> 
> (Admittedly it makes more sense to store the original data in a
> subobject

It depends on what you intend to achive. I can also see much value in the 
ability to re-create the original structure.

Thanks for the hints again. I guess there is lot's more to find, it's basically 
all PoC.

Rainer
, and add metadata to the top level - but with the lack of
> hierarchy in v6, that would make a v6 implementation of even a subset
> impossible.  I'm not sure how much that matters.)
> 
> 
> 
> > Please note that json-c seems to be unable to create JSON Null
> > values. As such, the "mandatory field" attribute currently has no
> > effect. I will try to work with the json-c team to see if there is a
> > solution.
> This is done by simply passing a NULL value of "struct json_object *".
> The 0.9 code doesn't handle this consistently, and manual checks for
> NULL are necessary; the current git tree is much nicer.
> 
> The master branch at
> http://fedorapeople.org/cgit/mitr/public_git/rsyslog.git/ implements
> the handling of nulls, and I'll add some memory leak fixes there.
>    Mirek
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards

Reply via email to