def gauge(metric, value, time = Time.now, count = 1)
      if valid?(metric, value, time, count) &&
          send_command("gauge", metric, value, time.to_i, count.to_i)
        value
      else
        nil
      end
    rescue Exception => e
      report_exception(e)
      nil
    end
def gauge(metric, value, time = Time.now, count = 1)
      if valid?(metric, value, time, count) &&
          send_command("gauge", metric, value, time.to_i, count.to_i)
        value
      else
        nil
      end
    rescue Exception => e
      report_exception(e)
      nil
    end
Sets up a connection to the collector.

  Instrumental::Agent.new(API_KEY)
  Instrumental::Agent.new(API_KEY, :collector => 'hostname:port')
 Store a gauge for a metric, optionally at a specific time.

  agent.gauge('load', 1.23)