X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=inline;f=src%2Fapache.c;h=3d6d957c5c2a721a3ce328fd19e27c2439e39a8c;hb=a59832f4891e6802119b7cf57e70c77a8ac20507;hp=ad877b5ff67d10b999c67192730ca14c74b9f20f;hpb=07be522384e753b7921213a0dc96a50336c79a66;p=collectd.git diff --git a/src/apache.c b/src/apache.c index ad877b5f..3d6d957c 100644 --- a/src/apache.c +++ b/src/apache.c @@ -313,7 +313,8 @@ static int config_add (oconfig_item_t *ci) (st->host != NULL) ? st->host : hostname_g, (st->name != NULL) ? st->name : "default"), - status = plugin_register_complex_read (callback_name, + status = plugin_register_complex_read (/* group = */ NULL, + /* name = */ callback_name, /* callback = */ apache_read_host, /* interval = */ NULL, /* user_data = */ &ud); @@ -688,6 +689,9 @@ static int apache_read_host (user_data_t *user_data) /* {{{ */ 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); + 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); } }