[Reconnoiter-devel] [reconnoiter commit] r1605 - trunk/src/modules-lua/noit/module

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Fri Apr 1 22:30:33 EDT 2011


Author: jesus
Date: 2011-04-01 22:30:33 -0400 (Fri, 01 Apr 2011)
New Revision: 1605

Modified:
   trunk/src/modules-lua/noit/module/resmon.lua
Log:
avoid attempting to extract metrics from a nil document -- avoids a senseless error message

Modified: trunk/src/modules-lua/noit/module/resmon.lua
===================================================================
--- trunk/src/modules-lua/noit/module/resmon.lua	2011-03-31 23:35:27 UTC (rev 1604)
+++ trunk/src/modules-lua/noit/module/resmon.lua	2011-04-02 02:30:33 UTC (rev 1605)
@@ -140,7 +140,9 @@
     local services = 0
     check.available()
     local data = doc:document()
-    services = json_metric(check, nil, data)
+    if data ~= nil then
+      services = json_metric(check, nil, data)
+    end
     check.metric_uint32("services", services)
     if services > 0 then check.good() else check.bad() end
     check.status("services=" .. services)



More information about the Reconnoiter-devel mailing list