コード例 #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
ファイル: mongodb.py プロジェクト: vetinari/zmon-worker
 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
ファイル: cloudwatch.py プロジェクト: vetinari/zmon-worker
 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
ファイル: zmon_.py プロジェクト: alfre2v/zmon-worker
 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
ファイル: zomcat.py プロジェクト: vetinari/zmon-worker
    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
ファイル: scalyr.py プロジェクト: drummerwolli/zmon-worker
 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
ファイル: kubernetes.py プロジェクト: bopopescu/zmon-worker
 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
ファイル: mongodb.py プロジェクト: alfre2v/zmon-worker
 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
ファイル: joblocks.py プロジェクト: drummerwolli/zmon-worker
 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
ファイル: kairosdb.py プロジェクト: tuxlife/zmon-worker
 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
ファイル: saml.py プロジェクト: drummerwolli/zmon-worker
 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
ファイル: zmon_.py プロジェクト: vetinari/zmon-worker
 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
ファイル: exasol.py プロジェクト: porrl/zmon-worker
 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
ファイル: counter.py プロジェクト: alfre2v/zmon-worker
 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
ファイル: sql_oracle.py プロジェクト: vetinari/zmon-worker
 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
ファイル: sql_mysql.py プロジェクト: alfre2v/zmon-worker
 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
ファイル: sql_oracle.py プロジェクト: nabcos/zmon-worker
 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'))
コード例 #24
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)
コード例 #25
0
ファイル: memcached.py プロジェクト: drummerwolli/zmon-worker
 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
ファイル: openam.py プロジェクト: vetinari/zmon-worker
 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
ファイル: exasol.py プロジェクト: vetinari/zmon-worker
 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
ファイル: checkldap.py プロジェクト: mtesseract/zmon-worker
    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
ファイル: sql_mysql.py プロジェクト: tuxlife/zmon-worker
 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
ファイル: jmx.py プロジェクト: tuxlife/zmon-worker
 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
ファイル: jmx.py プロジェクト: alfre2v/zmon-worker
 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
ファイル: checkldap.py プロジェクト: nabcos/zmon-worker
    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
ファイル: history.py プロジェクト: porrl/zmon-worker
 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
ファイル: appdynamics.py プロジェクト: vetinari/zmon-worker
 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
ファイル: nagios.py プロジェクト: porrl/zmon-worker
 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
ファイル: eventlog.py プロジェクト: alfre2v/zmon-worker
    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
ファイル: jobs.py プロジェクト: vetinari/zmon-worker
    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
ファイル: sql_mssql.py プロジェクト: amjedonline/zmon-worker
 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
ファイル: exceptions_.py プロジェクト: alfre2v/zmon-worker
    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)