示例#1
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(ScalyrWrapper, read_key=self.read_key, scalyr_region=self.scalyr_region)
示例#2
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(MongoDBWrapper, host=factory_ctx.get('host'))
示例#3
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(CloudwatchWrapper, region=factory_ctx.get('entity').get('region', None))
示例#4
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(ZmonWrapper, factory_ctx['redis_host'], factory_ctx['redis_port'])
示例#5
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """
        # load plugins dependencies and store them locally for efficiency
        if not self.http_factory:
            self.http_factory = plugin_manager.get_plugin_obj_by_name(
                'http', 'Function')

        if not self.jmx_factory:
            self.jmx_factory = plugin_manager.get_plugin_obj_by_name(
                'jmx', 'Function')

        if not self.counter_factory:
            self.counter_factory = plugin_manager.get_plugin_obj_by_name(
                'counter', 'Function')

        return propartial(ZomcatWrapper,
                          host=factory_ctx['host'],
                          instance=factory_ctx['instance'],
                          http=self.http_factory.create(factory_ctx),
                          jmx=self.jmx_factory.create(factory_ctx),
                          counter=self.counter_factory.create(factory_ctx))
示例#6
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(CloudwatchWrapper, region=factory_ctx.get('entity').get('region', None))
示例#7
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(ScalyrWrapper, read_key=self.read_key, scalyr_region=self.scalyr_region)
示例#8
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(KubernetesWrapper, check_id=factory_ctx['check_id'], __protected=['check_id'])
示例#9
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(MongoDBWrapper, host=factory_ctx.get('host'))
示例#10
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(JoblocksWrapper, cmdb_url=self.cmdb_url, project=factory_ctx['entity'].get('name'))
示例#11
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(ElasticsearchWrapper, url=self._url)
示例#12
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(KairosdbWrapper, url=self._url)
示例#13
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(SAMLWrapper, url=self.saml_url, user=self.username, password=self.__password)
示例#14
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(ZmonWrapper, factory_ctx['redis_host'],
                       factory_ctx['redis_port'])
示例#15
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(ExaplusWrapper, cluster=self._exacrm_cluster, password=self._exacrm_pass,
                       user=self._exacrm_user)
示例#16
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(CounterWrapper, key_prefix='{}:{}:'.format(factory_ctx['check_id'], factory_ctx['entity_id']),
                       redis_host=factory_ctx['redis_host'], redis_port=factory_ctx['redis_port'])
示例#17
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(SqlOracleWrapper, factory_ctx['host'], factory_ctx['port'], factory_ctx['entity'].get('sid'),
                       user=self._user, password=self._pass)
示例#18
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(MySqlWrapper, shards=factory_ctx['shards'], user=self._user, password=self._pass,
                       timeout=factory_ctx['soft_time_limit'] * 1000)
示例#19
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(SqlOracleWrapper, factory_ctx['host'], factory_ctx['port'], factory_ctx['entity'].get('sid'),
                       user=self._user, password=self._pass)
示例#20
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """

        seeds = factory_ctx.get('entity', {}).get('seeds') or factory_ctx.get('host')
        return propartial(CassandraWrapper, node=seeds, username=self._username, password=self._password)
示例#21
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(
         AppdynamicsWrapper, url=self._url, username=self._user, password=self._pass, es_url=self._es_url,
         index_prefix=self._index_prefix)
示例#22
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(BigqueryWrapper,
                       bigquery_key=self._bigquery_key,
                       location=self._location)
示例#23
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(JoblocksWrapper,
                       cmdb_url=self.cmdb_url,
                       project=factory_ctx['entity'].get('name'))
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """

        return propartial(EntitiesWrapper,
                          infrastructure_account=factory_ctx.get('entity', {}).get('infrastructure_account', None),
                          service_url=self.service_url, oauth2=self.oauth2)
示例#25
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     # load plugins dependencies and store them locally for efficiency
     if not self.counter_factory:
         self.counter_factory = plugin_manager.get_plugin_obj_by_name('counter', 'Function')
     return propartial(MemcachedWrapper, counter=self.counter_factory.create(factory_ctx), host=factory_ctx['host'])
示例#26
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(OpenAMWrapper,
                       url=self.openam_base_url,
                       user=self.username,
                       password=self.__password)
示例#27
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(HistoryWrapper,
                       url=self.url,
                       check_id=factory_ctx['check_id'],
                       entities=factory_ctx['entity_id_for_kairos'])
示例#28
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(ExaplusWrapper,
                       cluster=self._exacrm_cluster,
                       password=self._exacrm_pass,
                       user=self._exacrm_user)
示例#29
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """
        if not self.counter_factory:
            self.counter_factory = plugin_manager.get_plugin_obj_by_name('counter', 'Function')

        return propartial(LdapWrapper, user=self._ldapuser, password=self._ldappass, host=factory_ctx['host'],
                          counter=self.counter_factory.create(factory_ctx))
示例#30
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(MySqlWrapper,
                       shards=factory_ctx['shards'],
                       user=self._user,
                       password=self._pass,
                       timeout=factory_ctx['soft_time_limit'] * 1000)
示例#31
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(JmxWrapper,
                       jmxqueryhost=self._jmxquery_host,
                       jmxqueryport=self._jmxquery_port,
                       host=factory_ctx['host'],
                       port=factory_ctx['jmx_port'])
示例#32
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(JmxWrapper,
                       jmxqueryhost=self._jmxquery_host,
                       jmxqueryport=self._jmxquery_port,
                       host=factory_ctx['host'],
                       port=factory_ctx['jmx_port'])
示例#33
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(CounterWrapper,
                       key_prefix='{}:{}:'.format(factory_ctx['check_id'],
                                                  factory_ctx['entity_id']),
                       redis_host=factory_ctx['redis_host'],
                       redis_port=factory_ctx['redis_port'])
示例#34
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """
        if not self.counter_factory:
            self.counter_factory = plugin_manager.get_plugin_obj_by_name('counter', 'Function')

        return propartial(LdapWrapper, user=self._ldapuser, password=self._ldappass, host=factory_ctx['host'],
                          counter=self.counter_factory.create(factory_ctx))
示例#35
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(HistoryWrapper,
                       kairosdb_host=self.kairosdb_host,
                       kairosdb_port=self.kairosdb_port,
                       history_enabled=self.kairosdb_history_enabled,
                       check_id=factory_ctx['check_id'],
                       entities=factory_ctx['entity_id_for_kairos'])
示例#36
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(AppdynamicsWrapper,
                       url=self._url,
                       username=self._user,
                       password=self._pass,
                       es_url=self._es_url,
                       index_prefix=self._index_prefix)
示例#37
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """

        return propartial(EntitiesWrapper,
                          infrastructure_account=factory_ctx.get(
                              'entity', {}).get('infrastructure_account',
                                                None),
                          service_url=self.service_url,
                          oauth2=self.oauth2)
示例#38
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(NagiosWrapper,
                       factory_ctx['host'],
                       exasol_user=self._exarpc_user,
                       exasol_password=self._exarpc_pass,
                       lounge_mysql_user=self._loungemysql_user,
                       lounge_mysql_password=self._loungemysql_pass,
                       hetcrawler_proxy_user=self._hetcrawler_proxy_user,
                       hetcrawler_proxy_pass=self._hetcrawler_proxy_pass)
示例#39
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """

        # load plugins dependencies and store them locally for efficiency
        if not self.http_factory:
            self.http_factory = plugin_manager.get_plugin_obj_by_name('http', 'Function')

        return propartial(EventLogWrapper,
                          http_wrapper=self.http_factory.create(factory_ctx),
                          url=self.eventlog_url)
示例#40
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(NagiosWrapper,
                       factory_ctx['host'],
                       exasol_user=self._exarpc_user,
                       exasol_password=self._exarpc_pass,
                       lounge_mysql_user=self._loungemysql_user,
                       lounge_mysql_password=self._loungemysql_pass,
                       hetcrawler_proxy_user=self._hetcrawler_proxy_user,
                       hetcrawler_proxy_pass=self._hetcrawler_proxy_pass)
示例#41
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """
        # load plugins dependencies and store them locally for efficiency
        if not self.counter_factory:
            self.counter_factory = plugin_manager.get_plugin_obj_by_name(
                'counter', 'Function')

        return propartial(RedisWrapper,
                          counter=self.counter_factory.create(factory_ctx),
                          host=factory_ctx['host'],
                          password=self.__password)
示例#42
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """

        # load plugins dependencies and store them locally for efficiency
        if not self.http_factory:
            self.http_factory = plugin_manager.get_plugin_obj_by_name(
                'http', 'Function')

        return propartial(JobsWrapper,
                          http_wrapper=self.http_factory.create(factory_ctx),
                          project=factory_ctx['entity'].get('name'))
示例#43
0
 def create(self, factory_ctx):
     """
     Automatically called to create the check function's object
     :param factory_ctx: (dict) names available for Function instantiation
     :return: an object that implements a check function
     """
     return propartial(
         MsSqlWrapper,
         factory_ctx["host"],
         factory_ctx["port"],
         factory_ctx["database"],
         user=self._user,
         password=self._pass,
         timeout=factory_ctx["soft_time_limit"],
     )
示例#44
0
    def create(self, factory_ctx):
        """
        Automatically called to create the check function's object
        :param factory_ctx: (dict) names available for Function instantiation
        :return: an object that implements a check function
        """
        entity = factory_ctx['entity']
        project = entity['name'] if entity['type'] == 'project' else None

        # load plugins dependencies and store them locally for efficiency
        if not self.http_factory:
            self.http_factory = plugin_manager.get_plugin_obj_by_name('http', 'Function')

        return propartial(ExceptionsWrapper,
                          http_wrapper=self.http_factory.create(factory_ctx),
                          host=factory_ctx['host'],
                          instance=factory_ctx['instance'],
                          project=project)