** first try **


data = {}
File.foreach( "nagios.dat" ) do |e|
	next if e =~ /service \{|\}/
	k,v = e.strip.split("=")
	data[k] = v
end


it didnt work because of line below has more than one "="

>         performance_data=time=0.116677s;;;0.000000 size=3998B;;;0


** second try **

data = {}
File.foreach( "nagios.dat") do |e|
	next if e =~ /service \{|\}/
	if e.strip =~ /(.*?)=(.*)/
	       data[$1]=$2
	end		
end