This commit is contained in:
Grégory Soutadé 2014-12-10 07:09:05 +01:00
parent 751a9b3fae
commit 4f1c09867d
6 changed files with 75 additions and 10 deletions

View File

@ -25,7 +25,8 @@ from display import *
# Parse Log, compute them, call plugins and produce output
# For now, only HTTP log are valid
#
# Plugin requirements : None
# Plugin requirements :
# None
#
# Conf values needed :
# analyzed_filename
@ -582,7 +583,7 @@ class IWLA(object):
print '==> Load previous database'
self.meta_infos = self._deserialize(conf.META_PATH) or self._clearMeta()
if self.meta_infos['last_time']:
if 'last_time' in self.meta_infos.keys():
self.current_analysis = self._deserialize(self.getDBFilename(self.meta_infos['last_time'])) or self._clearVisits()
else:
self._clearVisits()

View File

@ -11,11 +11,11 @@ import awstats_data
#
# Extract referers and key phrases from requests
#
# Plugin requirements : None
# Plugin requirements :
# None
#
# Conf values needed :
# page_to_hit_conf*
# hit_to_page_conf*
# domain_name
#
# Output files :
# None
@ -24,9 +24,18 @@ import awstats_data
# None
#
# Statistics update :
# visits :
# remote_addr =>
# robot
# month_stats :
# referers =>
# pages
# hits
# robots_referers =>
# pages
# hits
# search_engine_referers =>
# pages
# hits
# key_phrases =>
# phrase
#
# Statistics deletion :
# None

View File

@ -3,6 +3,33 @@ import socket
from iwla import IWLA
from iplugin import IPlugin
#
# Post analysis hook
#
# Replace IP by reverse DNS names
#
# Plugin requirements :
# None
#
# Conf values needed :
# reverse_dns_timeout*
#
# Output files :
# None
#
# Statistics creation :
# None
#
# Statistics update :
# valid_visitors:
# remote_addr
# dns_name_replaced
# dns_analyzed
#
# Statistics deletion :
# None
#
class IWLAPostAnalysisReverseDNS(IPlugin):
DEFAULT_DNS_TIMEOUT = 0.5

View File

@ -3,6 +3,32 @@ import re
from iwla import IWLA
from iplugin import IPlugin
#
# Post analysis hook
#
# Count TOP downloads
#
# Plugin requirements :
# None
#
# Conf values needed :
# reverse_dns_timeout*
#
# Output files :
# None
#
# Statistics creation :
# None
#
# Statistics update :
# month_stats:
# top_downloads =>
# uri
#
# Statistics deletion :
# None
#
class IWLAPostAnalysisTopDownloads(IPlugin):
def __init__(self, iwla):
super(IWLAPostAnalysisTopDownloads, self).__init__(iwla)

View File

@ -7,7 +7,8 @@ from iplugin import IPlugin
# Pre analysis hook
# Change page into hit and hit into page into statistics
#
# Plugin requirements : None
# Plugin requirements :
# None
#
# Conf values needed :
# page_to_hit_conf*

View File

@ -10,7 +10,8 @@ import awstats_data
#
# Filter robots
#
# Plugin requirements : None
# Plugin requirements :
# None
#
# Conf values needed :
# page_to_hit_conf*