[collectd] Lighttpd plugin
eppo<span style="display: none;">.trailing-username</span>(a)<span style="display: none;">leading-domain.</span>darox.net
Wed Feb 14 11:03:55 CET 2007
After few tests, here is lighttpd plugin using mod_status parsing.
I tried to keep the apache plugin structure. In lighty status page (?auto), there is no scoreboard but only:
- total requests since start
- total outgoing bytes since start
- active connections
I picked them all except uptime (no need to graph/store this kind of data, don't we ?).
The native lighty rrd file (locally generated by lighttpd process) contains inbound traffic but not the active connections.
Comparatively to apache mod_status page, there is not scoreboard, cpu load, bytes per requests (there is no idle worker lighttpd process because lighty is monothreaded).
I followed debian plugin documentation instructions to compile the plugin, but -fPIC option makes collectd segfault, I didn't understand why. I had to link to libcurl to respect dependencies.
The config options are the same that apache plugin:
url, user, password, cert in <plugin lighttpd> directive.
Collectd makes 3 RRD file:
- lighttpd_connections with GAUGE DS: connections
- lighttpd_traffic with COUNTER DS: outgoing
- lighttpd_requests with COUNTER DS: requests
On Mon, 12 Feb 2007 16:22:52 +0100, Florent <eppo.trailing-username(a)leading-domain.darox.net> wrote:
> My long-term goal was to forward all my application generated RRD files
> through collectd. But It requires equal steps for the source and
> destination RRD files to work. I thought future version of collectd would
> implement such feature.
> For this plugin, I will try with the status page and post it here.
> On Mon, 12 Feb 2007 15:23:10 +0100, Florian Forster <octo.trailing-username(a)leading-domain.verplant.org>
>> Hi Florent,
>> thanks for your plugin :)
>> On Mon, Feb 12, 2007 at 02:54:23PM +0100, Florent wrote:
>>> How it works:
>>> - read function rrd_fetch a rrd file in the local filesystem and
>>> submit some values
>>> - write function stores the transferred values in another RRD file
>> Reading the values from an RRD-file and store them in another seems a
>> bit hack-ish to me. However, the lighttpd-guys seem to have implemented
>> a `mod_status'-module which is almost identical to the one found with
>> Apache. From what I can see in their wiki the `apache'-plugin should
>> work with lighttpd, except `BusyServers:' which would need to be added
>> to the `apache'-plugin.
>>> My plugin almost works, the only issue is the different step between
>>> the source RRD file (the lighttpd generated one: 60) and the
>>> destination RRD file (wrote by collectd on destination server: 10).
>> Yes, that's why I think it's hack-ish: Unless the RRD-file has a `LAST'
>> RRA you gen consolidated values and even if you get the plain values out
>> of a `LAST' RRA, you have the problem with `MIN' and `MAX'.
>> Would you mind giving the `apache'-plugin a try? Adding support for the
>> `BusyServers'-field shouldn't be a problem..
>> Florian octo Forster
>> Hacker in training
>> GnuPG: 0x91523C3D
> collectd mailing list
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6978 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070214/7a4193f9/lighttpd.obj
More information about the collectd