[Reconnoiter-devel] [reconnoiter commit] r1143 - trunk/src/modules

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Tue Dec 29 22:18:32 EST 2009


Author: jesus
Date: 2009-12-29 22:18:31 -0500 (Tue, 29 Dec 2009)
New Revision: 1143

Modified:
   trunk/src/modules/mysql.c
   trunk/src/modules/postgres.c
Log:
Adds row counts to postgres and mysql checks, refs #228

Modified: trunk/src/modules/mysql.c
===================================================================
--- trunk/src/modules/mysql.c	2009-12-24 15:17:47 UTC (rev 1142)
+++ trunk/src/modules/mysql.c	2009-12-30 03:18:31 UTC (rev 1143)
@@ -103,6 +103,8 @@
     current.status = "got rows, ok";
   }
 
+  noit_stats_set_metric(&current, "row_count", METRIC_INT32, &ci->rv);
+
   if(ci->rv > 0) {
     /* metrics */
     int nrows, ncols, i, j;

Modified: trunk/src/modules/postgres.c
===================================================================
--- trunk/src/modules/postgres.c	2009-12-24 15:17:47 UTC (rev 1142)
+++ trunk/src/modules/postgres.c	2009-12-30 03:18:31 UTC (rev 1143)
@@ -124,6 +124,7 @@
     int nrows, ncols, i, j;
     nrows = PQntuples(ci->result);
     ncols = PQnfields(ci->result);
+    noit_stats_set_metric(&current, "row_count", METRIC_INT32, &nrows);
     for (i=0; i<nrows; i++) {
       noitL(nldeb, "postgres: row %d [%d cols]:\n", i, ncols);
       if(ncols<2) continue;



More information about the Reconnoiter-devel mailing list