From: Florian Forster Date: Sat, 23 Jan 2010 12:06:48 +0000 (+0100) Subject: apache plugin: Added support for the "IdleWorkers" field. X-Git-Tag: collectd-4.10.0~65 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d01a318f5d2418a89dbd0961bec1d3ba28500811;p=collectd.git apache plugin: Added support for the "IdleWorkers" field. Thanks to Gary from the bug tracker for the suggestion and code :) --- diff --git a/src/apache.c b/src/apache.c index d6712dcb..1028f046 100644 --- a/src/apache.c +++ b/src/apache.c @@ -687,6 +687,9 @@ static int apache_read_host (user_data_t *user_data) /* {{{ */ submit_scoreboard (fields[1], st); else if (strcmp (fields[0], "BusyServers:") == 0) submit_gauge ("apache_connections", NULL, atol (fields[1]), st); + else if ((strcmp (fields[0], "IdleServers:") == 0) /* Apache 1.x */ + || (strcmp (fields[0], "IdleWorkers:") == 0) /* Apache 2.x */) + submit_gauge ("apache_idle_workers", NULL, atol (fields[1]), st); } } diff --git a/src/types.db b/src/types.db index a5872ebf..dffb10a7 100644 --- a/src/types.db +++ b/src/types.db @@ -1,6 +1,7 @@ absolute count:ABSOLUTE:0:U apache_bytes count:COUNTER:0:134217728 apache_connections count:GAUGE:0:65535 +apache_idle_workers count:GAUGE:0:65535 apache_requests count:COUNTER:0:134217728 apache_scoreboard count:GAUGE:0:65535 arc_counts demand_data:COUNTER:0:U, demand_metadata:COUNTER:0:U, prefetch_data:COUNTER:0:U, prefetch_metadata:COUNTER:0:U