def last_records(tag=@state_tag)
        if @state_type == 'file'
          return @data['last_records'][tag]

        elsif @state_type =='memory'
          return @data['last_records'][tag]
        elsif @state_type =='redis'
          begin
            alertStart=@redis.get(tag)
            return alertStart
          rescue Exception => e
            puts e.message
            puts e.backtrace.inspect
          end
        end
      end
def last_records(tag=@state_tag)
        if @state_type == 'file'
          return @data['last_records'][tag]

        elsif @state_type =='memory'
          return @data['last_records'][tag]
        elsif @state_type =='redis'
          begin
            alertStart=@redis.get(tag)
            return alertStart
          rescue Exception => e
            puts e.message
            puts e.backtrace.inspect
          end
        end
      end
end of intitialize