def monitor(options)
      agent_name = options[:agent_name]
      identity = options[:identity]
      pid_file = PidFile.new(identity)
      cfg = <<-EOF
check process #{agent_name}
  with pidfile \"#{pid_file}\"
  start program \"/opt/rightscale/bin/rnac --start #{agent_name}\"
  stop program \"/opt/rightscale/bin/rnac --stop #{agent_name}\"
  mode manual
      EOF
      cfg_file = File.join(AgentConfig.cfg_dir, agent_name, "#{identity}.conf")
      File.open(cfg_file, 'w') { |f| f.puts(cfg) }
      File.chmod(0600, cfg_file) # monit requires strict perms on this file
      puts "  - agent monit config: #{cfg_file}" unless options[:quiet]
      true
    end
def monitor(options)
      agent_name = options[:agent_name]
      identity = options[:identity]
      pid_file = PidFile.new(identity)
      cfg = <<-EOF
check process #{agent_name}
  with pidfile \"#{pid_file}\"
  start program \"/opt/rightscale/bin/rnac --start #{agent_name}\"
  stop program \"/opt/rightscale/bin/rnac --stop #{agent_name}\"
  mode manual
      EOF
      cfg_file = File.join(AgentConfig.cfg_dir, agent_name, "#{identity}.conf")
      File.open(cfg_file, 'w') { |f| f.puts(cfg) }
      File.chmod(0600, cfg_file) # monit requires strict perms on this file
      puts "  - agent monit config: #{cfg_file}" unless options[:quiet]
      true
    end
Setup agent monitoring

 === Parameters
 options(Hash):: Command line options

 === Return
 true:: Always return true