X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fnginx.c;h=c356353e3798ea3104625cb96c655e1271934eb8;hb=172dcccf29a7429a787d7e8b3457db1bee501585;hp=a87c35c986e35399acc1f0fe4232c4eeaf31f5f8;hpb=f87a715c49a41472dbeb5f244d84691365ef8745;p=collectd.git diff --git a/src/nginx.c b/src/nginx.c index a87c35c9..c356353e 100644 --- a/src/nginx.c +++ b/src/nginx.c @@ -122,7 +122,7 @@ static int init (void) curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1L); curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, nginx_curl_callback); - curl_easy_setopt (curl, CURLOPT_USERAGENT, PACKAGE_NAME"/"PACKAGE_VERSION); + curl_easy_setopt (curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT); curl_easy_setopt (curl, CURLOPT_ERRORBUFFER, nginx_curl_error); if (user != NULL) @@ -181,9 +181,7 @@ static void submit (char *type, char *inst, long long value) values[0].gauge = value; else if (strcmp (type, "nginx_requests") == 0) values[0].derive = value; - else if (strcmp (type, "nginx_accepts") == 0) - values[0].derive = value; - else if (strcmp (type, "nginx_handled") == 0) + else if (strcmp (type, "connections") == 0) values[0].derive = value; else return; @@ -258,8 +256,8 @@ static int nginx_read (void) && (atoll (fields[1]) != 0) && (atoll (fields[2]) != 0)) { - submit ("nginx_accepts", NULL, atoll (fields[0])); - submit ("nginx_handled", NULL, atoll (fields[1])); + submit ("connections", "accepted", atoll (fields[0])); + submit ("connections", "handled", atoll (fields[1])); submit ("nginx_requests", NULL, atoll (fields[2])); } }