lib/arborist/monitor/snmp.rb
changeset 3 d46ca2b52efe
parent 1 8446f55f7e58
child 4 e6eb11b1e00d
--- a/lib/arborist/monitor/snmp.rb	Mon Sep 05 20:59:01 2016 -0700
+++ b/lib/arborist/monitor/snmp.rb	Tue Sep 06 10:57:38 2016 -0700
@@ -23,7 +23,7 @@
 	log_to :arborist
 
 	# The version of this library.
-	VERSION = '0.2.0'
+	VERSION = '0.2.1'
 
 	# "Modes" that this monitor understands.
 	VALID_MODES = %i[ disk load memory swap process ]
@@ -248,8 +248,8 @@
 		# Map everything back to identifier -> attribute(s), and send to the manager.
 		#
 		reply = self.results.each_with_object({}) do |(address, results), hash|
-			identifier = self.identifiers[ address ].first
-			hash[ identifier ] = results
+			identifier = self.identifiers[ address ] or next
+			hash[ identifier.first ] = results
 		end
 		self.log.debug "Sending to manager: %p" % [ reply ]
 		return reply