From bd2d62708d3d284baa45011457f624b0e5d7cdb4 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 12 Apr 2010 14:08:33 +0200 Subject: [PATCH] pinba plugin: Fix the "request" type and dispatch the document size data. --- src/pinba.c | 6 +++++- src/types.db | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pinba.c b/src/pinba.c index 8ddd9966..a6fd06fe 100644 --- a/src/pinba.c +++ b/src/pinba.c @@ -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)); diff --git a/src/types.db b/src/types.db index a1bcc28d..69301b27 100644 --- a/src/types.db +++ b/src/types.db @@ -154,6 +154,7 @@ threads value:GAUGE:0:U time_dispersion seconds:GAUGE:-1000000:1000000 timeleft timeleft:GAUGE:0:3600 time_offset seconds:GAUGE:-1000000:1000000 +total_bytes value:DERIVE:0:U total_requests value:DERIVE:0:U total_time_in_ms value:DERIVE:0:U total_values value:DERIVE:0:U -- 2.30.2