Hello everyone,<div><br></div><div>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 !</div>

<div><br></div><div>Before going anywhere I first started with a test host application  where I got much of what I needed for the plugin working, after that I started the plugin and now have something which does compile but the problem comes from the fact that the official lua distribution is a static library which cannot be embedded in the shared library built for collectd (I tried but failed miserably), so here are the current options:</div>

<div><br></div><div>The first one is to link to a shared library release of lua which is available on some system like debian but since they are not &quot;official&quot; releases it all depends on your operating system (also on the good will of those who build them) and I do not have one easily available for my system as an example (Macbook pro with Mac OS X 10.6), taking this road will means it can be quite hard to get the required shared library and as a consequence: hard to have lua in your collectd build.</div>

<div><br></div><div>The second one is to include the lua sources themselves into the collectd plugin, lua is released under the MIT license so that is a nice thing and the code is not that big considering what it is (560KB), this solution could mean that lua will nearly always be available on any collectd build (except if specifically disable) but that the sources of collectd will include the lua files and be a little bigger.</div>

<div><span class="Apple-style-span" style="font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px; ">Another point toward this solution is that the plugin code will necessarily be tied to the current lua release and may break if linked with a later release without it being properly tested, but it cannot happen since we control the lua version.</span></div>

<div><span class="Apple-style-span" style="font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px; "><br></span></div><div><span class="Apple-style-span" style="font-family: helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px; ">I was also thinking about something else but linked to lua: have anyone thought about using a higher level language to configure filters ?</span></div>

<div><font class="Apple-style-span" face="helvetica, arial, freesans, clean, sans-serif"><span class="Apple-style-span" style="line-height: 20px;">I used them twice until now and seriously while the system itself is really powerful the configuration interface isn&#39;t really that great, it may be hard to do exactly what you want at first (There is a post in this mailing from me struggling on a filter problem which took me some days to figure out ;) ). When lua support is available it could be an option to allow filters to be defined in lua, I have absolutely no idea on the form it could take but I really want some feedback on this idea.</span></font></div>

<div><font class="Apple-style-span" face="helvetica, arial, freesans, clean, sans-serif"><span class="Apple-style-span" style="line-height: 20px; "><br></span></font></div><div><font class="Apple-style-span" face="helvetica, arial, freesans, clean, sans-serif"><span class="Apple-style-span" style="line-height: 20px;">Julien Ammous</span></font></div>