lib/perus/pinger/metrics/value.rb in perus-0.1.3 vs lib/perus/pinger/metrics/value.rb in perus-0.1.4
- old
+ new
@@ -8,11 +8,11 @@
option :grep
option :name
metric!
def run
- grep = optipns.grep.gsub('"', '\\"')
- line = shell(%q[cat #{options.path} | egrep "#{grep}"])
+ grep = options.grep.gsub('"', '\\"')
+ line = shell(%Q[cat #{options.path} | egrep "#{grep}"])
value = line.match(Regexp.compile(options.match))[1]
{options.name => value}
end
end
end