X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fapache.c;h=39849e6e05d6ebdc7699103957ecbaf2c351211b;hb=43f0e999f0816b6de916208f5b23297b68e7f397;hp=df1b560f092e89bbc8dd9cb65309fb55b20216f5;hpb=08affa52b44b8c375a62c12bec2b458bdef07fdc;p=collectd.git diff --git a/src/apache.c b/src/apache.c index df1b560f..39849e6e 100644 --- a/src/apache.c +++ b/src/apache.c @@ -202,7 +202,7 @@ static int config_set_boolean (int *ret_boolean, /* {{{ */ return (-1); } - if (ci->values[0].type != OCONFIG_TYPE_BOOLEAN) + if (ci->values[0].type == OCONFIG_TYPE_BOOLEAN) { if (ci->values[0].value.boolean) *ret_boolean = 1; @@ -685,8 +685,12 @@ 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); + 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); } }