/**
* collectd - src/mysql.c
- * Copyright (C) 2006-2009 Florian octo Forster
+ * Copyright (C) 2006-2010 Florian octo Forster
* Copyright (C) 2008 Mirko Buffoni
* Copyright (C) 2009 Doug MacEachern
* Copyright (C) 2009 Sebastian tokkee Harl
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Authors:
- * Florian octo Forster <octo at verplant.org>
+ * Florian octo Forster <octo at collectd.org>
* Mirko Buffoni <briareos at eswat.org>
* Doug MacEachern <dougm at hyperic.com>
* Sebastian tokkee Harl <sh at tokkee.org>
} /* submit */
static void counter_submit (const char *type, const char *type_instance,
- counter_t value, mysql_database_t *db)
+ derive_t value, mysql_database_t *db)
{
value_t values[1];
- values[0].counter = value;
+ values[0].derive = value;
submit (type, type_instance, values, STATIC_ARRAY_SIZE (values), db);
} /* void counter_submit */
submit (type, type_instance, values, STATIC_ARRAY_SIZE (values), db);
} /* void derive_submit */
-static void traffic_submit (counter_t rx, counter_t tx, mysql_database_t *db)
+static void traffic_submit (derive_t rx, derive_t tx, mysql_database_t *db)
{
value_t values[2];
- values[0].counter = rx;
- values[1].counter = tx;
+ values[0].derive = rx;
+ values[1].derive = tx;
submit ("mysql_octets", NULL, values, STATIC_ARRAY_SIZE (values), db);
} /* void traffic_submit */
MYSQL_RES *res;
MYSQL_ROW row;
char *query;
- int field_num;
derive_t qcache_hits = 0;
derive_t qcache_inserts = 0;
if (res == NULL)
return (-1);
- field_num = mysql_num_fields (res);
while ((row = mysql_fetch_row (res)))
{
char *key;