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


Python GenericServer.__init__方法代码示例

本文整理汇总了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
开发者ID:BenoitPoulet,项目名称:Nagstamon,代码行数:37,代码来源:Zabbix.py

示例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']
开发者ID:MaikL,项目名称:Nagstamon,代码行数:10,代码来源:Centreon.py

示例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)
开发者ID:minibbjd,项目名称:Nagstamon,代码行数:12,代码来源:op5Monitor.py

示例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
开发者ID:minibbjd,项目名称:Nagstamon,代码行数:13,代码来源:Zabbix.py

示例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
开发者ID:BenoitPoulet,项目名称:Nagstamon,代码行数:14,代码来源:Multisite.py

示例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"]
开发者ID:BenoitPoulet,项目名称:Nagstamon,代码行数:21,代码来源:Zenoss.py

示例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
开发者ID:MedicMomcilo,项目名称:Nagstamon,代码行数:25,代码来源:Zabbix.py

示例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
开发者ID:MedicMomcilo,项目名称:Nagstamon,代码行数:7,代码来源:Thruk.py


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