本文整理汇总了Python中Nagstamon.Servers.Generic.GenericServer.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python GenericServer.__init__方法的具体用法?Python GenericServer.__init__怎么用?Python GenericServer.__init__使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nagstamon.Servers.Generic.GenericServer
的用法示例。
在下文中一共展示了GenericServer.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
GenericServer.__init__(self, **kwds)
# Prepare all urls needed by nagstamon -
self.urls = {}
# self.statemap = {}
self.statemap = {
'UNREACH': 'UNREACHABLE',
'CRIT': 'CRITICAL',
'WARN': 'WARNING',
'UNKN': 'UNKNOWN',
'PEND': 'PENDING',
'0': 'OK',
'1': 'INFORMATION',
'2': 'WARNING',
'3': 'AVERAGE',
'4': 'HIGH',
'5': 'DISASTER'}
# Entries for monitor default actions in context menu
self.MENU_ACTIONS = ["Acknowledge", "Downtime"]
# URLs for browser shortlinks/buttons on popup window
self.BROWSER_URLS = {'monitor': '$MONITOR$',
'hosts': '$MONITOR-CGI$/hosts.php?ddreset=1',
'services': '$MONITOR-CGI$/zabbix.php?action=problem.view&fullscreen=0&page=1&filter_show=3&filter_set=1',
'history': '$MONITOR-CGI$/zabbix.php?action=problem.view&fullscreen=0&page=1&filter_show=2&filter_set=1'}
self.username = conf.servers[self.get_name()].username
self.password = conf.servers[self.get_name()].password
self.ignore_cert = conf.servers[self.get_name()].ignore_cert
self.use_description_name_service = conf.servers[self.get_name()].use_description_name_service
if self.ignore_cert is True:
self.validate_certs = False
else:
self.validate_certs = True
示例2: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
# add all keywords to object, every mode searchs inside for its favorite arguments/keywords
for k in kwds: self.__dict__[k] = kwds[k]
GenericServer.__init__(self, **kwds)
# Entries for monitor default actions in context menu
self.MENU_ACTIONS = ['Monitor', 'Recheck', 'Acknowledge', 'Downtime']
示例3: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
GenericServer.__init__(self, **kwds)
# Entries for monitor default actions in context menu
self.MENU_ACTIONS = ["Monitor", "Recheck", "Acknowledge", "Downtime"]
self.STATUS_SVC_MAPPING = {'0':'OK', '1':'WARNING', '2':'CRITICAL', '3':'UNKNOWN'}
self.STATUS_HOST_MAPPING = {'0':'UP', '1':'DOWN', '2':'UNREACHABLE'}
# Op5Monitor gives a 500 when auth is wrong
self.STATUS_CODES_NO_AUTH.append(500)
示例4: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
GenericServer.__init__(self, **kwds)
# Prepare all urls needed by nagstamon -
self.urls = {}
self.statemap = {}
# Entries for monitor default actions in context menu
self.MENU_ACTIONS = ["Recheck", "Acknowledge", "Downtime"]
self.username = conf.servers[self.get_name()].username
self.password = conf.servers[self.get_name()].password
示例5: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
GenericServer.__init__(self, **kwds)
# Prepare all urls needed by nagstamon -
self.urls = {}
self.statemap = {}
# Entries for monitor default actions in context menu
self.MENU_ACTIONS = ['Monitor', 'Recheck', 'Acknowledge', 'Downtime']
# flag for newer cookie authentication
self.CookieAuth = False
示例6: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
GenericServer.__init__(self, **kwds)
# Prepare all urls needed by nagstamon
self.urls = {}
self.statemap = {}
self.server = Server()
if ":" in conf.servers[self.get_name()].monitor_url:
self.server.server_url, self.server.server_port = conf.servers[self.get_name()].monitor_url.split(':')
else:
self.server.server_url = conf.servers[self.get_name()].monitor_url
self.server.server_port = 8080 #the default is 8080
self.server.username = conf.servers[self.get_name()].username
self.server.password = conf.servers[self.get_name()].password
# Entries for monitor default actions in context menu
self.MENU_ACTIONS = ["Acknowledge"]
示例7: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
GenericServer.__init__(self, **kwds)
# Prepare all urls needed by nagstamon -
self.urls = {}
###self.statemap = {}
self.statemap = {
'UNREACH': 'UNREACHABLE',
'CRIT': 'CRITICAL',
'WARN': 'WARNING',
'UNKN': 'UNKNOWN',
'PEND': 'PENDING',
'0': 'OK',
'1': 'UNKNOWN',
'2': 'WARNING',
'5': 'CRITICAL',
'3': 'WARNING',
'4': 'CRITICAL'}
# Entries for monitor default actions in context menu
self.MENU_ACTIONS = ["Recheck", "Acknowledge", "Downtime"]
self.username = conf.servers[self.get_name()].username
self.password = conf.servers[self.get_name()].password
示例8: __init__
# 需要导入模块: from Nagstamon.Servers.Generic import GenericServer [as 别名]
# 或者: from Nagstamon.Servers.Generic.GenericServer import __init__ [as 别名]
def __init__(self, **kwds):
GenericServer.__init__(self, **kwds)
# flag for newer cookie authentication
self.CookieAuth = False