Re: [collectd] lua plugin

2010-12-10 Thread Schmurfy
Hi, so... what do you think of this ? Julien Ammous On 5 December 2010 18:12, Schmurfy wrote: > Hi, > I added a form of alternative to the filters which should do the job for > me. I added a new hooks for plugins, they can register/unregister filter > callbacks, the way they work is dead simpl

Re: [collectd] lua plugin

2010-12-05 Thread Schmurfy
Hi, I added a form of alternative to the filters which should do the job for me. I added a new hooks for plugins, they can register/unregister filter callbacks, the way they work is dead simple: The callback method receives a copy of the value_list structure and is free to change whatever is inside

Re: [collectd] lua plugin

2010-12-04 Thread Florian Forster
Hi Schmurfy, On Sun, Nov 28, 2010 at 04:30:10PM +0100, Schmurfy wrote: > $PKG_CONFIG --exists lua5.1 2>/dev/null > becomes > $PKG_CONFIG --exists "lua >= 5.1" 2>/dev/null I've fixed this in my "ja/lua" branch. The name used by pkg-config is not determined fully automatically, but you can specify

Re: [collectd] lua plugin

2010-11-29 Thread Schmurfy
I pushed my changes, since you did not anything yet on notification you may be able to use my C to lua conversion code for them, you can drop the rest. I will let you finish the plugin. What annoys me the most is that I spent some hours on it yesterday for nothing, I would have worked on completing

Re: [collectd] lua plugin

2010-11-28 Thread Florian Forster
Hi again ;) On Sun, Nov 28, 2010 at 04:30:10PM +0100, Schmurfy wrote: > … callbacks … > do you really think the added complexity of the C code is really worth > what it brings to the lua side ? Just to make sure I understand your approach correctly: After the script is loaded, check if there is a

Re: [collectd] lua plugin

2010-11-28 Thread Florian Forster
Hi Schmurfy, I have now implemented basic support for write callbacks and improved the thread-handling: There is now one Lua thread created for each callback, which makes it possible for a Lua-based read function to indirectly call a Lua-based write function in the same script. On Thu, Nov 25, 20

Re: [collectd] lua plugin

2010-11-28 Thread Schmurfy
Hi, It works now thanks. I finally managed to compile a working lua plugin on my system the only problem I had is that the pkg-config package is called "lua" for me with 5.1 as its version, I tried to change the configure.in script to handle both cases but I gave up after half an hour on this and

Re: [collectd] lua plugin

2010-11-26 Thread Florian Forster
Hey, On Fri, Nov 26, 2010 at 09:46:40PM +0100, Schmurfy wrote: > I tried your branch but sadly I cannot build it, a dependency was > added which does not exists under Mac OS X (clock_gettime): I did some digging and apparently Mac OS X really doesn't have clock_gettime(2), it's not just a special

Re: [collectd] lua plugin

2010-11-26 Thread Schmurfy
I tried your branch but sadly I cannot build it, a dependency was added which does not exists under Mac OS X (clock_gettime): checking for clock_gettime... no checking for clock_gettime in -lrt... no checking for clock_gettime in -lposix4... no configure: error: cannot find clock_gettime On 25 N

Re: [collectd] lua plugin

2010-11-24 Thread Schmurfy
It is not improvements to do plugin that you did, it is more that you wrote half of the plugin ;) I already did most of the work you surely had to do to write this, I just wanted to have a build system running before adding more code to the plugin. For the read/write callbacks we can call a functi

Re: [collectd] lua plugin

2010-11-24 Thread Florian Forster
Hi, On Tue, Nov 23, 2010 at 10:20:10PM +0100, Florian Forster wrote: > no problem ;) While I still don't particularly *like* autoconf, I at > least learned to work with it. I'll look into it as soon as I find > some time for it. I've done some improvements to the build system and the plugin itsel

Re: [collectd] lua plugin

2010-11-23 Thread Adrian Perez
Hi! I used Lua myself in some projects, and it is a nice language to be used for extensions -- in fact one of its goals is to be easy to embed and extend, so I think it is a natural to consider embedding it into collectd :) Lately I have not been using Lua a lot, but I keep reading the lua-l mai

Re: [collectd] lua plugin

2010-11-23 Thread Florian Forster
Hi again, On Tue, Nov 23, 2010 at 09:33:23PM +0100, Schmurfy wrote: > > I'd go for a variant of the first option: Simply do a normal check for > > the library using autoconf and link with libtool. > > > I will certainly need your help on this ;) no problem ;) While I still don't particularly *lik

Re: [collectd] lua plugin

2010-11-23 Thread Schmurfy
On 23 November 2010 21:05, Florian Forster wrote: > Hi Julien, > > On Mon, Nov 22, 2010 at 11:03:14PM +0100, Schmurfy wrote: > > this discussion started with octo as private messages on github but he > > wisely asked me to post it on the mailing list so anyone can take part > > in it so here I am

Re: [collectd] lua plugin

2010-11-23 Thread Florian Forster
Hi Julien, On Mon, Nov 22, 2010 at 11:03:14PM +0100, Schmurfy wrote: > this discussion started with octo as private messages on github but he > wisely asked me to post it on the mailing list so anyone can take part > in it so here I am ! thanks for taking this here :) And sorry for not looking cl

[collectd] lua plugin

2010-11-22 Thread Schmurfy
Hello everyone, I started working on a lua plugin for collectd and I already have some problems in the first step, this discussion started with octo as private messages on github but he wisely asked me to post it on the mailing list so anyone can take part in it so here I am ! Before going anywhe