当前位置: 首页>>代码示例>>Python>>正文


Python Output.event方法代码示例

本文整理汇总了Python中Output.Output.event方法的典型用法代码示例。如果您正苦于以下问题:Python Output.event方法的具体用法?Python Output.event怎么用?Python Output.event使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Output.Output的用法示例。


在下文中一共展示了Output.event方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: send_message

# 需要导入模块: from Output import Output [as 别名]
# 或者: from Output.Output import event [as 别名]
    def send_message(self, event):

        if self._event_os_cached(event):
            return

        if self._exclude_event(event):
            return

        # use default values for some empty attributes
        event = self._plugin_defaults(event)

        Output.event(event)
        Stats.new_event(event)
        return
        # check for consolidation
        if self.conn is not None:
            try:
                self.conn.send(str(event))
            except:
                id = self._plugin.get("config", "plugin_id")
                c = ServerConnPro(self._conf, id)
                self.conn = c.connect(0, 10)
                try:
                    self.conn.send(str(event))
                except:
                    return

            logger.info(str(event).rstrip())

        elif not self.consolidation.insert(event):
            Output.event(event)

        Stats.new_event(event)
开发者ID:cterron,项目名称:OSSIM,代码行数:35,代码来源:Detector.py

示例2: send_message

# 需要导入模块: from Output import Output [as 别名]
# 或者: from Output.Output import event [as 别名]
    def send_message(self, event):

        if self._event_os_cached(event):
            return

        if self._exclude_event(event):
            return

        # use default values for some empty attributes
        event = self._plugin_defaults(event)
        Output.event(event)
        Stats.new_event(event)
        return
开发者ID:AntBean,项目名称:alienvault-ossim,代码行数:15,代码来源:Detector.py

示例3: clear

# 需要导入模块: from Output import Output [as 别名]
# 或者: from Output.Output import event [as 别名]
    def clear(self):

        events_to_remove = []

        for event in self.__event_list:
            Output.event(event)
            events_to_remove.append(event)
            Stats.consolidation['consolidated'] += 1

        for e in events_to_remove:
            self.__event_list.removeRule(e)

        del events_to_remove
开发者ID:CyberTaoFlow,项目名称:alienvault-ossim,代码行数:15,代码来源:Threshold.py

示例4: send_message

# 需要导入模块: from Output import Output [as 别名]
# 或者: from Output.Output import event [as 别名]
    def send_message(self, event):

        if self._event_os_cached(event):
            return

        if self._exclude_event(event):
            return

        # use default values for some empty attributes
#        check_data =True
#        if event["event_type"] != EventIdm.EVENT_TYPE:
#            check_data =False
        
        event = self._plugin_defaults(event)
        Output.event(event)
        Stats.new_event(event)
        return
开发者ID:DuVale,项目名称:phpzdl,代码行数:19,代码来源:Detector.py

示例5: evaluate

# 需要导入模块: from Output import Output [as 别名]
# 或者: from Output.Output import event [as 别名]
    def evaluate(self, rule_name):
        
        if self.first_value is None:
            logger.debug("Can not extract value (arg1) from monitor response or no initial value to compare with")
            return True

        value = None
        monitor_response = self.get_data(rule_name)
        if not monitor_response:
            logger.warning("No data received from monitor")
            return True
        else:
            value = self.get_value(monitor_response, rule_name)
            if value is None:
        	return True
        #if not value:
            #    continue
            if self.eval_condition(cond=self.watch_rule["condition"],
                                   arg1=self.first_value,
                                   arg2=value,
                                   value=int(self.watch_rule["value"])):
                self.watch_rule["type"] = "monitor"
        try:
            cond = self.watch_rule["condition"]
                        arg1 = self.first_value
                        arg2 = value
                        value = int(self.watch_rule["value"])
                        comm = self.queries
            log = "Monitor Command: %s , Monitor expresion evaluation: %s(arg2) <%s> %s(arg1) + %s(value)? , Command Response: %s" % (str(comm), str(arg2), str(cond), str(arg1), str(value), monitor_response.replace("\n", "\r"))
        except:
            log = "Monitor Exception"
                self.watch_rule = self._plugin_defaults(self.watch_rule, log)
                Output.event(self.watch_rule)
                Stats.new_event(self.watch_rule)
                return True

        logger.debug("No data matching the watch-rule received from monitor")
        return False
开发者ID:cterron,项目名称:OSSIM,代码行数:40,代码来源:Monitor.py

示例6: send_message

# 需要导入模块: from Output import Output [as 别名]
# 或者: from Output.Output import event [as 别名]
 def send_message(self,data):
     event = self._setdefaults(data)
     Output.event(event)
开发者ID:jackpf,项目名称:ossim-arc,代码行数:5,代码来源:InventoryTask.py


注:本文中的Output.Output.event方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。