apache plugin: Added support for the "IdleWorkers" field.
authorFlorian Forster <octo@huhu.verplant.org>
Sat, 23 Jan 2010 12:06:48 +0000 (13:06 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 23 Jan 2010 12:06:48 +0000 (13:06 +0100)
Thanks to Gary from the bug tracker for the suggestion and code :)

src/apache.c
src/types.db

index d6712dc..1028f04 100644 (file)
@@ -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);
                }
        }
 
index a5872eb..dffb10a 100644 (file)
@@ -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