Пример #1
0
    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')
Пример #2
0
    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')
Пример #3
0
    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
Пример #4
0
    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
Пример #5
0
 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']
Пример #6
0
 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']
Пример #7
0
    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
Пример #8
0
    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
Пример #9
0
 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']
Пример #10
0
 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']
Пример #11
0
    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
Пример #12
0
    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]
Пример #13
0
    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
Пример #14
0
    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
Пример #15
0
    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
Пример #16
0
    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
Пример #17
0
    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
Пример #18
0
    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
Пример #19
0
 def __init__(self, mlogfilter):
     BaseFilter.__init__(self, mlogfilter)
     
     if 'scan' in self.mlogfilter.args:
         self.active = self.mlogfilter.args['scan']
Пример #20
0
 def __init__(self, commandLineArgs):
     BaseFilter.__init__(self, commandLineArgs)
     if 'scan' in self.commandLineArgs:
         self.active = self.commandLineArgs['scan']
Пример #21
0
 def __init__(self, commandLineArgs):
     BaseFilter.__init__(self, commandLineArgs)
     if 'scan' in self.commandLineArgs:
         self.active = self.commandLineArgs['scan']
Пример #22
0
    def __init__(self, mlogfilter):
        BaseFilter.__init__(self, mlogfilter)

        if 'scan' in self.mlogfilter.args:
            self.active = self.mlogfilter.args['scan']
Пример #23
0
 def __init__(self, conf):
     BaseFilter.__init__(self, conf)