author | Amit Gupta <amit.gupta221@gmail.com> | |
Wed, 15 Apr 2009 08:40:26 +0000 (10:40 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Wed, 15 Apr 2009 08:40:26 +0000 (10:40 +0200) | ||
commit | ddb04607819e0026bb61e7af80f87d39c10dae91 | |
tree | 9abc1f179f5ea0594864520c575fd8a9711086c0 | tree | snapshot |
parent | 6faf6533009dd030888b9846778587c819093628 | commit | diff |
apache plugin: Add support for multiple servers.
Hi,
Based on Bruno/Florian input, I have changed the apache code to support
the following configuration structure:
<Plugin apache>
<Instance "instance_name">
URL ....
Host ... # optional and defaults to hostname_g
</Instance>
URL ...
</Plugin>
I have defined Instance as a block and not Host because the idea here is to
monitor multiple apache instances on the same machine. For apache instances on
remote machines, one could specify Host within the Instance block (which is
optional and default is hostname_g). For legacy configuration, I am converting
the legacy block to <Instance ""> which defaults to apache.
Do find the patch attached. I am not very familiar with git format-patch
and send-email functionalities as yet, so I am attaching a diff -ur
output as mentioned in the submitting-patches.shtml page.
The things which haven't been done as yet:
- I haven't used plugin_register_complex_read as yet. The main reason
being I am working on 4.6.1 version and I can't seem to find the
function plugin_register_complex_read in the code base. I believe it
is being added only in 4.6.2
- lighttpd scoreboard is not yet handled. This would probably be my next
task.
Question:
Given that this plugin can be used by both apache and lighttpd, how do
we find out if the server is lighttpd or apache?. It will be good to
have different rrd file names for apache and lighttpd which could only
be done if we set different vl.type for both the servers. One way I can
think of is to rely on the differences of the mod_status output of the
two servers or perhaps we could have a generic type as "httpd". (which
can be done only in the next major release if you folks are planning to
change the plugin name to httpd in the next major release)
Regards
Amit
Hi,
Based on Bruno/Florian input, I have changed the apache code to support
the following configuration structure:
<Plugin apache>
<Instance "instance_name">
URL ....
Host ... # optional and defaults to hostname_g
</Instance>
URL ...
</Plugin>
I have defined Instance as a block and not Host because the idea here is to
monitor multiple apache instances on the same machine. For apache instances on
remote machines, one could specify Host within the Instance block (which is
optional and default is hostname_g). For legacy configuration, I am converting
the legacy block to <Instance ""> which defaults to apache.
Do find the patch attached. I am not very familiar with git format-patch
and send-email functionalities as yet, so I am attaching a diff -ur
output as mentioned in the submitting-patches.shtml page.
The things which haven't been done as yet:
- I haven't used plugin_register_complex_read as yet. The main reason
being I am working on 4.6.1 version and I can't seem to find the
function plugin_register_complex_read in the code base. I believe it
is being added only in 4.6.2
- lighttpd scoreboard is not yet handled. This would probably be my next
task.
Question:
Given that this plugin can be used by both apache and lighttpd, how do
we find out if the server is lighttpd or apache?. It will be good to
have different rrd file names for apache and lighttpd which could only
be done if we set different vl.type for both the servers. One way I can
think of is to rely on the differences of the mod_status output of the
two servers or perhaps we could have a generic type as "httpd". (which
can be done only in the next major release if you folks are planning to
change the plugin name to httpd in the next major release)
Regards
Amit
src/apache.c | diff | blob | history |