Code

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 d6712dcb7885748be6725dcbe8793873ecd0e8b2..1028f046b54f552656f3b551c4c918ec4b2a957a 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 a5872ebf60e1dd8afec676b451b8a3c42711940a..dffb10a78d2ab3ac7ff9a7d6e7afd8e40bc2f36a 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