diff --git a/src/nginx.c b/src/nginx.c
index 7568a2c5ee2ded6439b6eb24927d64bb1b503e4a..c356353e3798ea3104625cb96c655e1271934eb8 100644 (file)
--- a/src/nginx.c
+++ b/src/nginx.c
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)
values[0].gauge = value;
else if (strcmp (type, "nginx_requests") == 0)
values[0].derive = value;
+ else if (strcmp (type, "connections") == 0)
+ values[0].derive = value;
else
return;
&& (atoll (fields[1]) != 0)
&& (atoll (fields[2]) != 0))
{
+ submit ("connections", "accepted", atoll (fields[0]));
+ submit ("connections", "handled", atoll (fields[1]));
submit ("nginx_requests", NULL, atoll (fields[2]));
}
}