def ey_agent_check
      results = {
        :description => 'Run ey-agent to monitor haproxy and monitor'
      }

      agent_results = JSON.load( `sudo ey-agent` )

      results.update(
        :message => agent_results.inspect,
        :status => agent_results && agent_results.any?{|k,v| v == 'down' }
      )
    rescue => e
      return results.update( :status => :failure, :exception => e )
    end
def ey_agent_check
      results = {
        :description => 'Run ey-agent to monitor haproxy and monitor'
      }

      agent_results = JSON.load( `sudo ey-agent` )

      results.update(
        :message => agent_results.inspect,
        :status => agent_results && agent_results.any?{|k,v| v == 'down' }
      )
    rescue => e
      return results.update( :status => :failure, :exception => e )
    end
Call ey-agent to return nginx or apache status as well as database status