apache plugin: Fix collection of the "apache_connections" value with Apache 2.*.
authorFlorian Forster <octo@huhu.verplant.org>
Sat, 23 Jan 2010 12:19:49 +0000 (13:19 +0100)
committerFlorian Forster <octo@huhu.verplant.org>
Sat, 23 Jan 2010 12:19:49 +0000 (13:19 +0100)
Thanks to Gary (bug tracker) for pointing this out :)

src/apache.c

index a333bf2..ebf245c 100644 (file)
@@ -689,7 +689,8 @@ static int apache_read_host (user_data_t *user_data) /* {{{ */
                {
                        if (strcmp (fields[0], "Scoreboard:") == 0)
                                submit_scoreboard (fields[1], st);
-                       else if (strcmp (fields[0], "BusyServers:") == 0)
+                       else if ((strcmp (fields[0], "BusyServers:") == 0) /* Apache 1.* */
+                                       || (strcmp (fields[0], "BusyWorkers:") == 0) /* Apache 2.* */)
                                submit_gauge ("apache_connections", NULL, atol (fields[1]), st);
                }
        }