[collectd] apache and collectd plugin

Bruno Prémont bonbons at linux-vserver.org
Mon Mar 16 10:39:39 CET 2009


Hi Amit,

On Mon, 16 March 2009 Amit Gupta <amit.gupta221 at gmail.com> wrote:
> Thanks for your quick reply. One easy way to handle this is to have a
> separate lighttpd plugin which will be similar to apache's plugin and
> will handle lighttpd specific statistics, for instance, fastcgi
> statistics which apache mod_status doesn't expose.
> 
> I will be happy to work on a separate lighttpd plugin if the separate
> plugin for lighttpd gets a green signal.
> 
> The other approach would be to rename apache plugin to httpd plugin
> (as someone has already suggested) and have two sub blocks as apache
> and lighttpd (each of them will have have their separate
> configuration settings e.g URL, CAcert and so on).
> 
> Which, according to you, is a better approach?
I would say neither is the best approach...

The best way to solve it would probably be to have apache plugin use
different configuration layout:

e.g.
<Apache>
  <Host "apache.domain.org">
    Url ...
  </Host>
  <Host "lightttpd.domain.org">
    Url ...
  </Host>
  Url ...
</Apache>

This way the <Host> blocks could be specified to denote different
servers (the code parsing status page would make distinction between
apache and lighttpd and collectd available statistics (as it does
already , at least partially)

The layout could also be like this (better?):
<Apache>
  <Server>
    Host  "www.domain.org"
    Instance ""
    Url ...
  </Server>
  <Server>
    Host "www.domain.org"
    Instance "8080"
    Url ...
  </Server>
  Url ...
</Apache>

This would allow specifying the host name for which the apache plugin
collects statistics and differentiate between to web-server processes
on the same host with different instances.
Default instance would be "" and default host would be collectd's host
name.

The configuration outside of <Server> block would continue working as
it does not but be handled as if it was enclosed with <Server> block
(and using default values for Host and Instance)


This kind of thought could also be applied to other plugins that can
collect remote data...

Bruno



More information about the collectd mailing list