Monitoring agent in ruby