X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpinba.c;h=6879733501cbedaa32cbfaa4afde3ca527771894;hb=499cbd1605850e0feca405fb2579064d330eea8f;hp=8ddd9966c71d890b3b5e8e4319b4f32b7dd601e3;hpb=60c387cb3adda350ac8607afd87a282857109a57;p=collectd.git diff --git a/src/pinba.c b/src/pinba.c index 8ddd9966..68797335 100644 --- a/src/pinba.c +++ b/src/pinba.c @@ -617,7 +617,7 @@ static int plugin_config (oconfig_item_t *ci) /* {{{ */ if (strcasecmp ("Address", child->key) == 0) cf_util_get_string (child, &conf_node); else if (strcasecmp ("Port", child->key) == 0) - cf_util_get_string (child, &conf_service); + cf_util_get_service (child, &conf_service); else if (strcasecmp ("View", child->key) == 0) pinba_config_view (child); else @@ -645,7 +645,7 @@ static int plugin_init (void) /* {{{ */ if (collector_thread_running) return (0); - status = pthread_create (&collector_thread_id, + status = plugin_thread_create (&collector_thread_id, /* attrs = */ NULL, collector_thread, /* args = */ NULL); @@ -697,13 +697,17 @@ static int plugin_submit (const pinba_statnode_t *res) /* {{{ */ sstrncpy (vl.plugin_instance, res->name, sizeof (vl.plugin_instance)); value.derive = res->req_count; - sstrncpy (vl.type, "requests", sizeof (vl.type)); + sstrncpy (vl.type, "total_requests", sizeof (vl.type)); plugin_dispatch_values (&vl); value.derive = float_counter_get (&res->req_time, /* factor = */ 1000); sstrncpy (vl.type, "total_time_in_ms", sizeof (vl.type)); plugin_dispatch_values (&vl); + value.derive = res->doc_size; + sstrncpy (vl.type, "total_bytes", sizeof (vl.type)); + plugin_dispatch_values (&vl); + value.derive = float_counter_get (&res->ru_utime, /* factor = */ 100); sstrncpy (vl.type, "cpu", sizeof (vl.type)); sstrncpy (vl.type_instance, "user", sizeof (vl.type_instance));