#!/usr/bin/ruby1.9
require 'memcached'
status = 'OK'
ret = 0
begin
cache = Memcached.new('172.31.2.1:11211')
# cache.get 'ticker_mtgox', false
cache.get 'ticker_bitstamp', false
rescue Memcached::NotFound => msg
status = "CRITICAL #{msg}"
ret = 2
rescue Exception => msg
status = "CRITICAL #{msg}"
ret = 2
end
puts status
exit ret