def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) self.fromReached = False self.toReached = False self.active = ('from' in self.mlogfilter.args and self.mlogfilter.args['from'] != 'start') or \ ('to' in self.mlogfilter.args and self.mlogfilter.args['to'] != 'end')
def __init__(self, commandLineArgs): BaseFilter.__init__(self, commandLineArgs) self.fromReached = False self.toReached = False if "from" in self.commandLineArgs or "to" in self.commandLineArgs: self.active = True
def __init__(self, commandLineArgs): BaseFilter.__init__(self, commandLineArgs) self.fromReached = False self.toReached = False if 'from' in self.commandLineArgs or 'to' in self.commandLineArgs: self.active = True
def __init__(self, commandLineArgs): BaseFilter.__init__(self, commandLineArgs) if 'fast' in self.commandLineArgs and self.commandLineArgs['fast'] != False: self.active = True if self.commandLineArgs['fast'] == None: self.fastms = 1000 else: self.fastms = self.commandLineArgs['fast']
def __init__(self, commandLineArgs): BaseFilter.__init__(self, commandLineArgs) if 'slow' in self.commandLineArgs and self.commandLineArgs['slow'] != False: self.active = True if self.commandLineArgs['slow'] == None: self.slowms = 1000 else: self.slowms = self.commandLineArgs['slow']
def __init__(self, commandLineArgs): BaseFilter.__init__(self, commandLineArgs) # extract all arguments passed into 'word' if 'word' in self.commandLineArgs and self.commandLineArgs['word']: self.words = self.commandLineArgs['word'].split() self.active = True else: self.active = False
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) # extract all arguments passed into 'word' if 'word' in self.mlogfilter.args and self.mlogfilter.args['word']: self.words = self.mlogfilter.args['word'].split() self.active = True else: self.active = False
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter ) if 'fast' in self.mlogfilter.args and self.mlogfilter.args['fast'] != False: self.active = True if self.mlogfilter.args['fast'] == None: self.fastms = 1000 else: self.fastms = self.mlogfilter.args['fast']
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) if 'fast' in self.mlogfilter.args and self.mlogfilter.args[ 'fast'] != False: self.active = True if self.mlogfilter.args['fast'] == None: self.fastms = 1000 else: self.fastms = self.mlogfilter.args['fast']
def __init__(self, conf): BaseFilter.__init__(self, conf) self.query = Query(self.conf.get("query")) self.key = Path(self.conf.get("key", ".").strip("$")) self.raw_operations = sorted(set(self.conf.get("operations", ["count"]))) self.operations = [Operation(op) for op in self.raw_operations] self.raw_retentions = conf.get("retentions", ["10s:1w"]) self.retentions = [parse_retentions(r) for r in self.raw_retentions] tags = ["generated", "aggregate"] + self.raw_operations + self.conf.get("tags", []) self.hb = HashBuilder({"type": "aggregation", "tags": tags }) self.time_retentions = [time.time() for _ in self.retentions] self.values_retentions = [[] for _ in self.retentions] self.historic_retentions = [{op: [None for _ in range(persist)] for op in self.raw_operations} for delta, persist in self.retentions]
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) self.components = None self.levels = None self.namespaces = None self.operations = None self.threads = None self.commands = None self.pattern = None self.planSummaries = None if 'component' in self.mlogfilter.args and self.mlogfilter.args[ 'component']: self.components = custom_parse_array( self.mlogfilter.args['component']) self.active = True if 'level' in self.mlogfilter.args and self.mlogfilter.args['level']: self.levels = custom_parse_array(self.mlogfilter.args['level']) self.active = True if 'namespace' in self.mlogfilter.args and self.mlogfilter.args[ 'namespace']: self.namespaces = custom_parse_array( self.mlogfilter.args['namespace']) self.active = True if 'operation' in self.mlogfilter.args and self.mlogfilter.args[ 'operation']: self.operations = custom_parse_array( self.mlogfilter.args['operation']) self.active = True if 'command' in self.mlogfilter.args and self.mlogfilter.args[ 'command']: self.commands = custom_parse_array(self.mlogfilter.args['command']) self.active = True if 'thread' in self.mlogfilter.args and self.mlogfilter.args['thread']: self.threads = custom_parse_array(self.mlogfilter.args['thread']) self.active = True if 'pattern' in self.mlogfilter.args and self.mlogfilter.args[ 'pattern']: self.pattern = json2pattern(self.mlogfilter.args['pattern']) self.active = True if self.pattern is None: raise SystemExit( "ERROR: cannot parse pattern \"%s\" as a JSON string" % self.mlogfilter.args['pattern']) if 'planSummary' in self.mlogfilter.args and self.mlogfilter.args[ 'planSummary']: self.planSummaries = custom_parse_array( self.mlogfilter.args['planSummary']) self.active = True
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) self.namespace = None self.operation = None self.thread = None if 'namespace' in self.mlogfilter.args and self.mlogfilter.args['namespace']: self.namespace = self.mlogfilter.args['namespace'] self.active = True if 'operation' in self.mlogfilter.args and self.mlogfilter.args['operation']: self.operation = self.mlogfilter.args['operation'] self.active = True if 'thread' in self.mlogfilter.args and self.mlogfilter.args['thread']: self.thread = self.mlogfilter.args['thread'] self.active = True
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) self.components = None self.levels = None self.namespaces = None self.operations = None self.threads = None self.commands = None self.pattern = None self.planSummaries = None if 'component' in self.mlogfilter.args and self.mlogfilter.args[ 'component']: self.components = custom_parse_array( self.mlogfilter.args['component']) self.active = True if 'level' in self.mlogfilter.args and self.mlogfilter.args['level']: self.levels = custom_parse_array(self.mlogfilter.args['level']) self.active = True if 'namespace' in self.mlogfilter.args and self.mlogfilter.args[ 'namespace']: self.namespaces = custom_parse_array( self.mlogfilter.args['namespace']) self.active = True if 'operation' in self.mlogfilter.args and self.mlogfilter.args[ 'operation']: self.operations = custom_parse_array( self.mlogfilter.args['operation']) self.active = True if 'command' in self.mlogfilter.args and self.mlogfilter.args[ 'command']: self.commands = custom_parse_array(self.mlogfilter.args['command']) self.active = True if 'thread' in self.mlogfilter.args and self.mlogfilter.args['thread']: self.threads = custom_parse_array(self.mlogfilter.args['thread']) self.active = True if 'pattern' in self.mlogfilter.args and self.mlogfilter.args[ 'pattern']: self.pattern = json2pattern(self.mlogfilter.args['pattern']) self.active = True if 'planSummary' in self.mlogfilter.args and self.mlogfilter.args[ 'planSummary']: self.planSummaries = custom_parse_array( self.mlogfilter.args['planSummary']) self.active = True
def __init__(self, commandLineArgs): BaseFilter.__init__(self, commandLineArgs) self.namespace = None self.operation = None self.thread = None if 'namespace' in self.commandLineArgs and self.commandLineArgs[ 'namespace']: self.namespace = self.commandLineArgs['namespace'] self.active = True if 'operation' in self.commandLineArgs and self.commandLineArgs[ 'operation']: self.operation = self.commandLineArgs['operation'] self.active = True if 'thread' in self.commandLineArgs and self.commandLineArgs['thread']: self.thread = self.commandLineArgs['thread'] self.active = True
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) self.namespace = None self.operation = None self.thread = None self.pattern = None if 'namespace' in self.mlogfilter.args and self.mlogfilter.args[ 'namespace']: self.namespace = self.mlogfilter.args['namespace'] self.active = True if 'operation' in self.mlogfilter.args and self.mlogfilter.args[ 'operation']: self.operation = self.mlogfilter.args['operation'] self.active = True if 'thread' in self.mlogfilter.args and self.mlogfilter.args['thread']: self.thread = self.mlogfilter.args['thread'] self.active = True if 'pattern' in self.mlogfilter.args and self.mlogfilter.args[ 'pattern']: self.pattern = json2pattern(self.mlogfilter.args['pattern']) self.active = True
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) self.components = None self.levels = None self.namespaces = None self.operations = None self.threads = None self.commands = None self.pattern = None self.planSummaries = None if 'component' in self.mlogfilter.args and self.mlogfilter.args['component']: self.components = custom_parse_array(self.mlogfilter.args['component']) self.active = True if 'level' in self.mlogfilter.args and self.mlogfilter.args['level']: self.levels = custom_parse_array(self.mlogfilter.args['level']) self.active = True if 'namespace' in self.mlogfilter.args and self.mlogfilter.args['namespace']: self.namespaces = custom_parse_array(self.mlogfilter.args['namespace']) self.active = True if 'operation' in self.mlogfilter.args and self.mlogfilter.args['operation']: self.operations = custom_parse_array(self.mlogfilter.args['operation']) self.active = True if 'command' in self.mlogfilter.args and self.mlogfilter.args['command']: self.commands = custom_parse_array(self.mlogfilter.args['command']) self.active = True if 'thread' in self.mlogfilter.args and self.mlogfilter.args['thread']: self.threads = custom_parse_array(self.mlogfilter.args['thread']) self.active = True if 'pattern' in self.mlogfilter.args and self.mlogfilter.args['pattern']: self.pattern = json2pattern(self.mlogfilter.args['pattern']) self.active = True if 'planSummary' in self.mlogfilter.args and self.mlogfilter.args['planSummary']: self.planSummaries = custom_parse_array(self.mlogfilter.args['planSummary']) self.active = True
def __init__(self, mlogfilter): BaseFilter.__init__(self, mlogfilter) if 'scan' in self.mlogfilter.args: self.active = self.mlogfilter.args['scan']
def __init__(self, commandLineArgs): BaseFilter.__init__(self, commandLineArgs) if 'scan' in self.commandLineArgs: self.active = self.commandLineArgs['scan']
def __init__(self, conf): BaseFilter.__init__(self, conf)