[collectd] apache and collectd plugin

Florian Forster octo at verplant.org
Wed Apr 22 10:23:53 CEST 2009


Hi Amit,

On Tue, Apr 21, 2009 at 07:08:43PM +0530, Amit Gupta wrote:
> We would have issues in case where say apache is just reading and
> lighttpd is reading post, legends for both is  "R".

oh, crap, you're right..

> How about not making any server determination and creating scoreboard
> rrd files only if the counter for the legend has a value greater than
> zero.

That's what we do in the MySQL plugin, e. g. for the mysql_command type.
I have to admit I'm not very happy with this solution: If the MySQL
database is restarted, a bunch of hardly used commands is NaN (instead
of zero), which confuses people (and is not nice either).

For the scoreboard graphs we'd have to keep all those keep all those
counters and convert the scoreboard type into counters. We'd then face
the same “NaN instead of zero” issue when collectd is restarted.

I think we have two options left:

 - Set a header callback using the CURLOPT_HEADERFUNCTION option and
   look for the ‘Server’ header field. If it contains “lighttpd”, assume
   lighttpd, Apache otherwise.

 - Let the user configure which server software he's using.

The two could be combined, of course: Use the user's setting if he has
given one, (try to) determine the server software automatically if not.

What do you think?

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090422/fd21e83d/attachment.pgp 


More information about the collectd mailing list