本文整理汇总了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']
示例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",
]