Exemplo n.º 1
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        import params
        env.set_params(params)
        File(format("/etc/sysconfig/metron"), content=Template("metron.j2"))

        commands = RestCommands(params)
        commands.init_kafka_topics()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()
Exemplo n.º 2
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"),
             content=Template("metron.j2")
             )

        commands = RestCommands(params)
        commands.init_kafka_topics()
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()
Exemplo n.º 3
0
    def service_check(self, env):
        from params import params

        # check the parsers
        Logger.info("Performing Parser service check")
        parser_cmds = ParserCommands(params)
        parser_cmds.service_check(env)

        # check enrichment
        Logger.info("Performing Enrichment service check")
        enrichment_cmds = EnrichmentCommands(params)
        enrichment_cmds.service_check(env)

        # check indexing
        Logger.info("Performing Indexing service check")
        indexing_cmds = IndexingCommands(params)
        indexing_cmds.service_check(env)

        # check the profiler
        Logger.info("Performing Profiler service check")
        profiler_cmds = ProfilerCommands(params)
        profiler_cmds.service_check(env)

        # check the rest api
        Logger.info("Performing REST application service check")
        rest_cmds = RestCommands(params)
        rest_cmds.service_check(env)

        # check the management UI
        Logger.info("Performing Management UI service check")
        mgmt_cmds = ManagementUICommands(params)
        mgmt_cmds.service_check(env)

        # check the alerts UI
        Logger.info("Performing Alerts UI service check")
        alerts_cmds = AlertsUICommands(params)
        alerts_cmds.service_check(env)

        Logger.info("Metron service check completed successfully")
        exit(0)
Exemplo n.º 4
0
    def service_check(self, env):
        from params import params

        # check the parsers
        Logger.info("Performing Parser service check")
        parser_cmds = ParserCommands(params)
        parser_cmds.service_check(env)

        # check enrichment
        Logger.info("Performing Enrichment service check")
        enrichment_cmds = EnrichmentCommands(params)
        enrichment_cmds.service_check(env)

        # check indexing
        Logger.info("Performing Indexing service check")
        indexing_cmds = IndexingCommands(params)
        indexing_cmds.service_check(env)

        # check the profiler
        Logger.info("Performing Profiler service check")
        profiler_cmds = ProfilerCommands(params)
        profiler_cmds.service_check(env)

        # check the rest api
        Logger.info("Performing REST application service check")
        rest_cmds = RestCommands(params)
        rest_cmds.service_check(env)

        # check the management UI
        Logger.info("Performing Management UI service check")
        mgmt_cmds = ManagementUICommands(params)
        mgmt_cmds.service_check(env)

        # check the alerts UI
        Logger.info("Performing Alerts UI service check")
        alerts_cmds = AlertsUICommands(params)
        alerts_cmds.service_check(env)

        Logger.info("Metron service check completed successfully")
        exit(0)
Exemplo n.º 5
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        if params.security_enabled:
            params.metron_jvm_flags = format(
                '-Djava.security.auth.login.config={client_jaas_path}')

        env.set_params(params)
        File(format("/etc/sysconfig/metron"), content=Template("metron.j2"))

        commands = RestCommands(params)
        if params.security_enabled and not commands.is_acl_configured():
            commands.init_kafka_acls()
            commands.set_acl_configured()
Exemplo n.º 6
0
 def restart(self, env):
     from params import params
     env.set_params(params)
     self.configure(env)
     commands = RestCommands(params)
     commands.restart_rest_application(env)
Exemplo n.º 7
0
 def stop(self, env, upgrade_type=None):
     from params import params
     env.set_params(params)
     commands = RestCommands(params)
     commands.stop_rest_application()
Exemplo n.º 8
0
 def start(self, env, upgrade_type=None):
     from params import params
     env.set_params(params)
     self.configure(env)
     commands = RestCommands(params)
     commands.start_rest_application()
Exemplo n.º 9
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"), content=Template("metron.j2"))

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()

        if params.metron_knox_enabled and not params.metron_ldap_enabled:
            raise Fail(
                "Enabling Metron with Knox requires LDAP authentication.  Please set 'LDAP Enabled' to true in the Metron Security tab."
            )
Exemplo n.º 10
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"), content=Template("metron.j2"))

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_pcap_configured():
            commands.init_pcap()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()
        if params.security_enabled and not commands.is_pcap_perm_configured():
            # If we Kerberize the cluster, we need to call this again, to remove write perms from hadoop group
            # If we start off Kerberized, it just does the same thing twice.
            commands.init_pcap()
            commands.set_pcap_perm_configured()
Exemplo n.º 11
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"),
             content=Template("metron.j2")
             )

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()
Exemplo n.º 12
0
    def configure(self, env, upgrade_type=None, config_dir=None):
        from params import params
        env.set_params(params)
        File(format("/etc/default/metron"),
             content=Template("metron.j2")
             )

        metron_service.refresh_configs(params)

        commands = RestCommands(params)

        if not commands.is_kafka_configured():
            commands.init_kafka_topics()
        if not commands.is_hbase_configured():
            commands.create_hbase_tables()
        if not commands.is_pcap_configured():
            commands.init_pcap()
        if not commands.is_metron_user_hdfs_dir_configured():
            commands.create_metron_user_hdfs_dir()
        if params.security_enabled and not commands.is_hbase_acl_configured():
            commands.set_hbase_acls()
        if params.security_enabled and not commands.is_kafka_acl_configured():
            commands.init_kafka_acls()
            commands.set_kafka_acl_configured()
        if params.security_enabled and not commands.is_pcap_perm_configured():
            # If we Kerberize the cluster, we need to call this again, to remove write perms from hadoop group
            # If we start off Kerberized, it just does the same thing twice.
            commands.init_pcap()
            commands.set_pcap_perm_configured()