Exemplo n.º 1
0
    def service_check(self, env):
        """
        Performs a service check for Indexing.
        :param env: Environment
        """
        metron_service.check_indexer_parameters()

        Logger.info('Checking Kafka topics for Indexing')
        metron_service.check_kafka_topics(self.__params, self.__get_topics())

        Logger.info("Checking HBase for Indexing")
        metron_service.check_hbase_table(self.__params, self.__params.update_hbase_table)
        metron_service.check_hbase_column_family(self.__params, self.__params.update_hbase_table, self.__params.update_hbase_cf)

        Logger.info('Checking Elasticsearch templates for Indexing')
        self.check_elasticsearch_templates()

        if self.__params.security_enabled:

            Logger.info('Checking Kafka ACLs for Indexing')
            metron_service.check_kafka_acls(self.__params, self.__get_topics())
            metron_service.check_kafka_acl_groups(self.__params, self.__get_kafka_acl_groups())

            Logger.info("Checking HBase ACLs for Indexing")
            metron_service.check_hbase_acls(self.__params, self.__params.update_hbase_table)

        Logger.info("Checking for Indexing topology")
        if not self.is_topology_active(env):
            raise Fail("Indexing topology not running")

        Logger.info("Indexing service check completed successfully")
Exemplo n.º 2
0
    def service_check(self, env):
        """
        Performs a service check for the Profiler.
        :param env: Environment
        """
        Logger.info('Checking Kafka topics for Profiler')
        metron_service.check_kafka_topics(self.__params,
                                          [self.__params.profiler_input_topic])

        Logger.info("Checking HBase table for profiler")
        metron_service.check_hbase_table(self.__params,
                                         self.__params.profiler_hbase_table)
        metron_service.check_hbase_column_family(
            self.__params, self.__params.profiler_hbase_table,
            self.__params.profiler_hbase_cf)

        if self.__params.security_enabled:

            Logger.info('Checking Kafka ACLs for Profiler')
            metron_service.check_kafka_acls(self.__params, self.__get_topics())
            metron_service.check_kafka_acl_groups(
                self.__params, self.__get_kafka_acl_groups())

            Logger.info('Checking Kafka ACLs for Profiler')
            metron_service.check_hbase_acls(self.__params,
                                            self.__params.profiler_hbase_table)

        Logger.info("Checking for Profiler topology")
        if not self.is_topology_active(env):
            raise Fail("Profiler topology not running")

        Logger.info("Profiler service check completed successfully")
    def service_check(self, env):
        """
        Performs a service check for the Profiler.
        :param env: Environment
        """
        Logger.info('Checking Kafka topics for Profiler')
        metron_service.check_kafka_topics(self.__params, [self.__params.profiler_input_topic])

        Logger.info("Checking HBase table for profiler")
        metron_service.check_hbase_table(self.__params, self.__params.profiler_hbase_table)
        metron_service.check_hbase_column_family(self.__params, self.__params.profiler_hbase_table, self.__params.profiler_hbase_cf)

        if self.__params.security_enabled:

            Logger.info('Checking Kafka ACLs for Profiler')
            metron_service.check_kafka_acls(self.__params, self.__get_topics())
            metron_service.check_kafka_acl_groups(self.__params, self.__get_kafka_acl_groups())

            Logger.info('Checking Kafka ACLs for Profiler')
            metron_service.check_hbase_acls(self.__params, self.__params.profiler_hbase_table)

        Logger.info("Checking for Profiler topology")
        if not self.is_topology_active(env):
            raise Fail("Profiler topology not running")

        Logger.info("Profiler service check completed successfully")
Exemplo n.º 4
0
    def service_check(self, env):
        """
        Performs a service check for Enrichment.
        :param env: Environment
        """
        Logger.info("Checking for Geo database")
        metron_service.check_hdfs_file_exists(
            self.__params,
            self.__params.geoip_hdfs_dir + "/GeoLite2-City.tar.gz")

        Logger.info("Checking for ASN database")
        metron_service.check_hdfs_file_exists(
            self.__params, self.__params.asn_hdfs_dir + "/GeoLite2-ASN.tar.gz")

        Logger.info('Checking Kafka topics for Enrichment')
        metron_service.check_kafka_topics(self.__params, self.__get_topics())

        Logger.info("Checking HBase for Enrichment")
        metron_service.check_hbase_table(self.__params,
                                         self.__params.enrichment_hbase_table)
        metron_service.check_hbase_column_family(
            self.__params, self.__params.enrichment_hbase_table,
            self.__params.enrichment_hbase_cf)

        Logger.info("Checking HBase for Threat Intel")
        metron_service.check_hbase_table(self.__params,
                                         self.__params.threatintel_hbase_table)
        metron_service.check_hbase_column_family(
            self.__params, self.__params.threatintel_hbase_table,
            self.__params.threatintel_hbase_cf)

        if self.__params.security_enabled:

            Logger.info('Checking Kafka ACLs for Enrichment')
            metron_service.check_kafka_acls(self.__params, self.__get_topics())
            metron_service.check_kafka_acl_groups(
                self.__params, self.__get_kafka_acl_groups())

            Logger.info("Checking HBase ACLs for Enrichment")
            metron_service.check_hbase_acls(
                self.__params, self.__params.enrichment_hbase_table)
            metron_service.check_hbase_acls(
                self.__params, self.__params.threatintel_hbase_table)

        Logger.info("Checking for Enrichment topology")
        if not self.is_topology_active(env):
            raise Fail("Enrichment topology not running")

        Logger.info("Enrichment service check completed successfully")
    def service_check(self, env):
        """
        Performs a service check for Enrichment.
        :param env: Environment
        """
        Logger.info("Checking for Geo database")
        metron_service.check_hdfs_file_exists(self.__params, self.__params.geoip_hdfs_dir + "/GeoLite2-City.tar.gz")

        Logger.info("Checking for ASN database")
        metron_service.check_hdfs_file_exists(self.__params, self.__params.asn_hdfs_dir + "/GeoLite2-ASN.tar.gz")

        Logger.info('Checking Kafka topics for Enrichment')
        metron_service.check_kafka_topics(self.__params, self.__get_topics())

        Logger.info("Checking HBase for Enrichment")
        metron_service.check_hbase_table(
          self.__params,
          self.__params.enrichment_hbase_table)
        metron_service.check_hbase_column_family(
          self.__params,
          self.__params.enrichment_hbase_table,
          self.__params.enrichment_hbase_cf)

        Logger.info("Checking HBase for Threat Intel")
        metron_service.check_hbase_table(
          self.__params,
          self.__params.threatintel_hbase_table)
        metron_service.check_hbase_column_family(
          self.__params,
          self.__params.threatintel_hbase_table,
          self.__params.threatintel_hbase_cf)

        if self.__params.security_enabled:

          Logger.info('Checking Kafka ACLs for Enrichment')
          metron_service.check_kafka_acls(self.__params, self.__get_topics())
          metron_service.check_kafka_acl_groups(self.__params, self.__get_kafka_acl_groups())

          Logger.info("Checking HBase ACLs for Enrichment")
          metron_service.check_hbase_acls(self.__params, self.__params.enrichment_hbase_table)
          metron_service.check_hbase_acls(self.__params, self.__params.threatintel_hbase_table)

        Logger.info("Checking for Enrichment topology")
        if not self.is_topology_active(env):
            raise Fail("Enrichment topology not running")

        Logger.info("Enrichment service check completed successfully")