def __init__(self, cfg, logTTL=30, maxLogsToProcess=0, parserID=0, parserName='Syslog', logFile='/var/log/syslog', keepPersistentStats=True, metricsMode=False, baselineMode=False, sentryClient=None): Inquisit.__init__(self, cfg, lgrName=__name__, sentryClient=sentryClient) self.parserID = parserID self.parserName = parserName self.logFile = logFile self.logTTL = int(logTTL) self.maxLogsToProcess = int(maxLogsToProcess) self.keepPersistentStats = bool(keepPersistentStats) self.metricsMode = bool(metricsMode) self.baselineMode = bool(baselineMode) # initialize offset file self.offsetFile = '/opt/inquisition/tmp/' + str( self.parserID) + '_' + self.parserName + '.offset' # load templates into template store self.templateStore = self.fetchTemplates() self.lgr.info('loaded [ ' + str(len(self.templateStore)) + ' ] templates for ' + self.__str__()) self.lgr.debug(self.__str__() + ' created [ SUCCESSFULLY ]')
def __init__(self, cfg, sentryClient=None): Inquisit.__init__(self, cfg, lgrName=__name__, sentryClient=sentryClient) # start connection pool manager self.connPool = urllib3.PoolManager()
def __init__(self, cfg, sentryClient=None): Inquisit.__init__(self, cfg, lgrName=__name__, sentryClient=sentryClient) self.lgr.info('loading Anatomize.py instance...') # load parsers and associated templates try: self.parserStore = self.fetchParsers() self.lgr.debug('loaded [ ' + str(len(self.parserStore)) + ' ] parsers into parser store') except (InternalError, ProgrammingError) as e: self.lgr.critical( 'could not fetch parsers from inquisition database :: [ ' + str(e) + ' ]') if Inquisit.sentryClient: Inquisit.sentryClient.captureException() exit(1) self.lgr.info('loading of Anatomize.py [ COMPLETE ]')
def __init__(self, cfg, sentryClient=None): Inquisit.__init__(self, cfg, lgrName=__name__, sentryClient=sentryClient)