   else
     query = query_config[query_db][query_name].query
     influx_clients[query_db].query(query, (e, return_series) ->
+      msg.send "Got " + JSON.stringify(return_series)
       msg.send format_query_result(return_series)
     )
 
 format_query_result = (query_json) ->
+  if query_json.length == 0
+    return "No results returned"
   for result in query_json
     columns = result.columns
     data = result.points

      hours = nconf.get("HUBOT_INFLUXALERTS_HOURS_BEFORE_ACK_REPOST")
      interval = nconf.get("ONE_HOUR_MS")*hours
      if cur_ts - ack_ts > interval

        new_alert(robot, msg, query_name, data, columns)
                    
    else

  buf = make_alert_message(query_config, data, columns, msg)
  buf += "\n"
  buf += "To claim this alert use the id #{id}. \"influx claim #{id}\"\n"
  if msg
    msg.send buf
  else
    console.log("sending room alert")
    room = nconf.get("HUBOT_INFLUXALERTS_ALERT_ROOM")
    if room
      robot.messageRoom room, buf

make_alert_message = (query_object, data, columns, msg) ->
  query_columns = query_object.alert_msg.columns
