[collectd] PATCH apache.c: support IBM HTTP Server.

Manuel Luis Sanmartín Rozada manuel.luis at gmail.com
Wed Sep 8 11:01:23 CEST 2010


IBM HTTP Server is a version of apache 2 that comes with Websphere.
IBM change the server name header to:

Server: IBM_HTTP_Server

diff --git a/src/apache.c b/src/apache.c
index 3d6d957..80c66bf 100644
--- a/src/apache.c
+++ b/src/apache.c
@@ -144,6 +144,8 @@ static size_t apache_header_callback (void *buf,
size_t size, size_t nmemb,
                st->server_type = APACHE;
        else if (strstr (buf, "lighttpd") != NULL)
                st->server_type = LIGHTTPD;
+       else if (strstr (buf, "IBM_HTTP_Server") != NULL)
+               st->server_type = APACHE;
        else
        {
                const char *hdr = buf;
@@ -420,6 +422,8 @@ static int init_host (apache_t *st) /* {{{ */
                        st->server_type = APACHE;
                else if (strcasecmp(st->server, "lighttpd") == 0)
                        st->server_type = LIGHTTPD;
+               else if (strcasecmp(st->server, "ibm_http_server") == 0)
+                       st->server_type = APACHE;
                else
                        WARNING ("apache plugin: Unknown `Server' setting: %s",
                                        st->server);



More information about the collectd mailing list