def docid_to_date(self, fn):
     """turn ...logs/2013-11-14/conn.22:05:46-22:08:52.log.gz into
     a date of 2009-03-27 16:00"""
     d = fn.split("/")[-2]
     h = fn[-24:-22]
     t = "%s.%s" % (d, h)
     return util.strptime(t,'%Y-%m-%d.%H')
 def docid_to_date(self, fn):
     """turn /data/argus/sensor/year/month/day/argus.2009.03.01.10.30.00 into
     a date of 2009-03-01 10:00
     We'll assume Carter Bullard's suggested format until this can work with a config option"""
     extension = self.cfg_data["archive_extension"]
     if extension:
         fn = fn.replace(extension, "")
     t = fn[-12:]
     return util.strptime(t, "%Y%m%d%H%M%S")
Exemple #3
0
 def docid_to_date(self, fn):
     """turn /usr/local/var/db/flows/packeteer/2009/2009-03/2009-03-27/ft-v05.2009-03-27.1615 into
     a date of 2009-03-27 16:15"""
     t = fn[-15:]
     return util.strptime(t, '%Y-%m-%d.%H%M')
 def docid_to_date(self, fn):
     """turn ips.2011-04-15-12.txt into a date"""
     t = fn[-13:]
     return util.strptime(t,'%Y-%m-%d-%H')
Exemple #5
0
 def docid_to_date(self, fn):
     """turn /data/nfsen/profiles/live/podium/nfcapd.200903011020 into
     a date of 2009-03-01 10:20"""
     t = fn[-12:]
     return util.strptime(t,'%Y%m%d%H%M')
 def docid_to_date(self, fn):
     """turn /usr/local/var/db/flows/packeteer/2009/2009-03/2009-03-27/ft-v05.2009-03-27.1615 into
     a date of 2009-03-27 16:15"""
     t = fn[-15:]
     return util.strptime(t,'%Y-%m-%d.%H%M')
Exemple #7
0
 def docid_to_date(self, fn):
     """turn ips.2011-04-15-12.txt into a date"""
     t = fn[-13:]
     return util.strptime(t, '%Y-%m-%d-%H')