[Resmon-devel] [resmon commit] r244 - branches/testmod

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Fri Feb 19 16:03:15 EST 2010


Author: mark
Date: 2010-02-19 16:03:15 -0500 (Fri, 19 Feb 2010)
New Revision: 244

Modified:
   branches/testmod/testmod
Log:
Update to support multiple metrics

Modified: branches/testmod/testmod
===================================================================
--- branches/testmod/testmod	2010-02-19 16:01:00 UTC (rev 243)
+++ branches/testmod/testmod	2010-02-19 21:03:15 UTC (rev 244)
@@ -40,5 +40,13 @@
 # You shouldn't need to edit below this line
 eval "use Resmon::Module::$module;";
 my $obj = bless \%kvs, "Resmon::Module::$module";
-my ($st, $msg) = $obj->handler();
-print "$kvs{object}($module) :: $st($msg)\n";
+my ($st, $metrics) = $obj->handler();
+if (ref($metrics) ne "HASH") {
+    $metrics = {
+        "message" => $metrics
+    };
+}
+print "$module $kvs{object} - $st\n\n";
+while(my ($k, $v) = each %$metrics) {
+   printf "%15s = %s\n", $k , $v;
+}



More information about the Resmon-devel mailing list