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


Python MacroResolver.output_macros方法代码示例

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


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

示例1: init

# 需要导入模块: from shinken.macroresolver import MacroResolver [as 别名]
# 或者: from shinken.macroresolver.MacroResolver import output_macros [as 别名]
    def init(self):
        print "Initialisation of the livestatus broker"

        #to_queue is where we get broks from Broker
        #self.to_q = self.properties['to_queue']

        #from_quue is where we push back objects like
        #external commands to the broker
        #self.from_q = self.properties['from_queue']

        self.prepare_log_db()
        self.prepare_pnp_path()


        self.livestatus = LiveStatus(self.configs, self.hostname_lookup_table, self.servicename_lookup_table, self.hosts, self.services, self.contacts, self.hostgroups, self.servicegroups, self.contactgroups, self.timeperiods, self.commands, self.schedulers, self.pollers, self.reactionners, self.brokers, self.dbconn, self.pnp_path, self.from_q)

        m = MacroResolver()
        m.output_macros = ['HOSTOUTPUT', 'HOSTPERFDATA', 'HOSTACKAUTHOR', 'HOSTACKCOMMENT', 'SERVICEOUTPUT', 'SERVICEPERFDATA', 'SERVICEACKAUTHOR', 'SERVICEACKCOMMENT']
开发者ID:wAmpIre,项目名称:shinken,代码行数:20,代码来源:livestatus_broker.py

示例2: init

# 需要导入模块: from shinken.macroresolver import MacroResolver [as 别名]
# 或者: from shinken.macroresolver.MacroResolver import output_macros [as 别名]
    def init(self):
        print "Initialisation of the thrift broker"

        # to_queue is where we get broks from Broker
        # self.to_q = self.properties['to_queue']

        # from_quue is where we push back objects like
        # external commands to the broker
        # self.from_q = self.properties['from_queue']

        # db has to be opened in the manage_brok thread
        self.prepare_log_db()
        self.prepare_pnp_path()

        self.thrift = Thrift_status(
            self.configs,
            self.hosts,
            self.services,
            self.contacts,
            self.hostgroups,
            self.servicegroups,
            self.contactgroups,
            self.timeperiods,
            self.commands,
            self.schedulers,
            self.pollers,
            self.reactionners,
            self.brokers,
            self.dbconn,
            self.pnp_path,
            self.from_q,
        )

        m = MacroResolver()
        m.output_macros = [
            "HOSTOUTPUT",
            "HOSTPERFDATA",
            "HOSTACKAUTHOR",
            "HOSTACKCOMMENT",
            "SERVICEOUTPUT",
            "SERVICEPERFDATA",
            "SERVICEACKAUTHOR",
            "SERVICEACKCOMMENT",
        ]
开发者ID:jfbutkiewicz,项目名称:Windows-Setup-for-Shinken,代码行数:46,代码来源:thrift_broker.py


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