[collectd] write_mongodb plugin working

Chris Lundquist clundquist at bluebox.net
Tue Jan 17 06:52:20 CET 2012


I would love to see this get pulled into the code base. There seems to be a few other outstanding pull requests there as well, so I thought I would post here since that is a secondary mirror.

https://github.com/octo/collectd/pull/12

Please let me know what I can do to expedite the process. Originally there was a missing "opts" structure that I nuked since it was not defined, along with some other pseudocode like things.

I compiled that code against

https://github.com/mongodb/mongo-c-driver tag v0.4


The mongo-c-driver doesn't have an install target so it was difficult to get the plugin to link against it as autoconf made some presumptions about having an include and lib directory.

Here is some sample output. The short tags of "ts", "i", "h", etc were there already. I was wondering if it might be helpful to be more verbose? I assume that they are short for size reasons.

$ mongo
MongoDB shell version: 1.8.2
connecting to: test
> show dbs
admin	(empty)
collectd	0.203125GB

> show collections
interface
load
memory
system.indexes

db.interface.find()
{ "_id" : ObjectId("4f15016613426e13ee1fce73"), "ts" : ISODate("133611749-01--2147483647T05:08:46.720Z"), "h" : "collectd.example.com", "i" : "lo", "t" : "if_octets", "ti" : "", "rx" : NumberLong(52595), "tx" : NumberLong(52595) }

> db.interface.count();
1608

> db.memory.find();
{ "_id" : ObjectId("4f15016613426e13ee1fce74"), "ts" : ISODate("133611749-01--2147483647T00:22:26.560Z"), "h" : "collectd.example.com", "i" : "", "t" : "memory", "ti" : "used", "value" : 222003200 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120116/24696fff/attachment.html>


More information about the collectd mailing list