From e900a095b78ceaf59139726c2838baeeb34c1a8b Mon Sep 17 00:00:00 2001 From: Jeremy Kitchen Date: Wed, 7 Jan 2015 20:44:33 +0000 Subject: [PATCH] arrayify the values and collects otherwise if you don't pass in an array you get a really awful error :) --- templates/plugin/snmp.conf.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/plugin/snmp.conf.erb b/templates/plugin/snmp.conf.erb index 379184c15..0d0511943 100644 --- a/templates/plugin/snmp.conf.erb +++ b/templates/plugin/snmp.conf.erb @@ -5,7 +5,7 @@ Type "<%= val['Type'] %>" Table <%= val['Table'] %> Instance "<%= val['Instance'] %>" - Values <% val['Values'].sort.each do |x| -%>"<%= x %>" <% end %> + Values <% Array(val['Values']).sort.each do |x| -%>"<%= x %>" <% end %> <% end -%> <% @hosts.sort_by {|k,v| k}.each do |key,val| -%> @@ -13,7 +13,7 @@ Address "<%= val['Address'] %>" Version <%= val['Version'] %> Community "<%= val['Community'] %>" - Collect <% val['Collect'].sort.each do |x| -%>"<%= x -%>" <% end %> + Collect <% Array(val['Collect']).sort.each do |x| -%>"<%= x -%>" <% end %> Interval <%= val['Interval'] %> <% end -%>