Sure thing.  I'm heading out in a bit (nice and sunny out today!) but I'll
be around again later this afternoon, and will check my mail.

Brian

On Sat, Mar 17, 2012 at 12:47 PM, Rainer Gerhards
<rgerha...@hq.adiscon.com>wrote:

> > -----Original Message-----
> > From: rsyslog-boun...@lists.adiscon.com [mailto:rsyslog-
> > boun...@lists.adiscon.com] On Behalf Of Brian Knox
> > Sent: Saturday, March 17, 2012 5:45 PM
> > To: rsyslog-users
> > Subject: Re: [rsyslog] ommongodb feedback
> >
> > Just let me know if there's anything I can help test after you dig into
> > it
> > some, I'm happy to help.
>
> I'd apprecite if you could get it a shot when the initial config interface
> is
> ready, but still with fixed and limited field set. Would be great if you
> then
> could have a look, just so that someone else (especially with good Mongo
> know
> how ;)) has a look.
>
> Rainer
>
> > Brian
> >
> > On Sat, Mar 17, 2012 at 12:36 PM, Rainer Gerhards
> > <rgerha...@hq.adiscon.com>wrote:
> >
> > > Brian,
> > >
> > > I am right now working on the config. The legacy method does no
> > longer
> > > work,
> > > you need to use the v6 method of doing things, that is
> > >
> > > Action(type="ommongodb" template="..." server= ...)
> > >
> > > While I changed the config yesterday, some other issues came up, so
> > it took
> > > me a while and is not yet completed. I am about to actually use the
> > config
> > > options ;) It is most important that only the template you currently
> > use
> > > works - no other fields (or order) are currently supported.
> > >
> > > Also, there seems to be a memory leak. It's not rooted in ommongodb,
> > but
> > > ommongodb (among others) triggers it. That's probably the next thing
> > I look
> > > at (before doing the config options).
> > >
> > > Rainer
> > >
> > > > -----Original Message-----
> > > > From: rsyslog-boun...@lists.adiscon.com [mailto:rsyslog-
> > > > boun...@lists.adiscon.com] On Behalf Of Brian Knox
> > > > Sent: Saturday, March 17, 2012 5:11 PM
> > > > To: rsyslog-users
> > > > Subject: [rsyslog] ommongodb feedback
> > > >
> > > > I built a fresh version of rsyslog head this morning, and I'm
> > trying to
> > > > get
> > > > ommongodb to work.  I haven't gotten it working yet, but wanted to
> > > > provide
> > > > feedback on what I've found so far:
> > > >
> > > > 2012-03-17T11:53:12.704925-04:00 arthur rsyslogd-2007: can not
> > > > initialize
> > > > MongoDB handle [try http://www.rsyslog.com/e/2007 ]
> > > >
> > > > In my config, I have:
> > > >
> > > > $ModLoad ommongodb.so
> > > >
> > > > $template
> > > > StdMongoDBFmt,"%msg%%syslogfacility%%HOSTNAME%%syslogpriority%"
> > > > *.* :ommongodb:127.0.0.1,syslog,logs;StdMongoDBFmt
> > > >
> > > > I have mongo up:
> > > >
> > > > [bknox@arthur ~]$ mongo 127.0.0.1
> > > > MongoDB shell version: 2.0.3
> > > > connecting to: 127.0.0.1/test
> > > > >
> > > >
> > > > With a syslog db:
> > > >
> > > > > use syslog
> > > > switched to db syslog
> > > > >
> > > >
> > > > I also have libmongo-client installed:
> > > >
> > > > [bknox@arthur lib]$ ls | grep libmongo-client
> > > > libmongo-client.a
> > > > libmongo-client.la
> > > > libmongo-client.so
> > > > libmongo-client.so.0
> > > > libmongo-client.so.0.3.0
> > > >
> > > > Looking at my debug logs, I see the module loading:
> > > >
> > > > 9972.879072700:7f8428bf5700: Requested to load module
> > 'ommongodb.so'
> > > > 9972.879087102:7f8428bf5700: loading module
> > > > '/usr/local/lib/rsyslog/ommongodb.so'
> > > > 9972.880311646:7f8428bf5700: ommongodb: module compiled with
> > rsyslog
> > > > version 6.3.7-tmp1.
> > > > 9972.880380169:7f8428bf5700: module ommongodb.so of type 1 being
> > > > loaded.
> > > > 9972.880440298:7f8428bf5700: module config name is 'ommongodb'
> > > >
> > > > Further in the logs, I see:
> > > >
> > > > 9972.885142231:7f8428bf5700: ommongodb: trying connect to
> > '127.0.0.1'
> > > > at
> > > > port 0
> > > > 9972.885458006:7f8428bf5700: Called LogError, msg: can not
> > initialize
> > > > MongoDB handle
> > > > 9972.885477965:7f8428bf5700: tried selector action for
> > ommongodb.so: -
> > > > 2007
> > > > 9972.885484427:7f8428bf5700: Module ommongodb.so processes this
> > action.
> > > > 9972.885491894:7f8428bf5700: template: 'StdMongoDBFmt' assigned
> > > > 9972.885498082:7f8428bf5700: Action 0xb5b1e0 transitioned to state:
> > > > susp
> > > >
> > > > So digging in to the rsyslog code, I see:
> > > >
> > > > 157     DBGPRINTF("ommongodb: trying connect to '%s' at port %d\n",
> > > > server,
> > > > pData->port);
> > > > 158     pData->conn = mongo_sync_connect(server, pData->port,
> > TRUE);
> > > >
> > > > Digging a little more, I see:
> > > >
> > > > 219 static inline void
> > > > 220 setInstParamDefaults(instanceData *pData)
> > > > 221 {
> > > > 222     pData->server = NULL;
> > > > 223     pData->port = 27017;
> > > > 224     pData->db = NULL;
> > > > 225     pData->collection= NULL;
> > > > 226     pData->uid = NULL;
> > > > 227     pData->pwd = NULL;
> > > > 228     pData->tplName = NULL;
> > > > 229 }
> > > >
> > > > So it looks like the code should be trying 27017, but the debug log
> > > > clearly
> > > > says port 0
> > > >
> > > > So I tried hard coding the port:
> > > >
> > > > 158     pData->conn = mongo_sync_connect(server, 27017, TRUE);
> > > >
> > > > And rebuilding....
> > > >
> > > > Which changes the error I'm getting, but doesn't fix it:
> > > >
> > > > mongo_sync_cmd_insert(): Transport endpoint is not connected
> > > >
> > > > That's as far as I've gotten so far.
> > > >
> > > > Brian
> > > > _______________________________________________
> > > > rsyslog mailing list
> > > > http://lists.adiscon.net/mailman/listinfo/rsyslog
> > > > http://www.rsyslog.com/professional-services/
> > > _______________________________________________
> > > rsyslog mailing list
> > > http://lists.adiscon.net/mailman/listinfo/rsyslog
> > > http://www.rsyslog.com/professional-services/
> > >
> > _______________________________________________
> > rsyslog mailing list
> > http://lists.adiscon.net/mailman/listinfo/rsyslog
> > http://www.rsyslog.com/professional-services/
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
>
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/

Reply via email to