You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by nickwallen <gi...@git.apache.org> on 2018/06/20 13:53:11 UTC

[GitHub] metron pull request #1069: METRON-1624 Set Profiler and Enrichment batch par...

GitHub user nickwallen opened a pull request:

    https://github.com/apache/metron/pull/1069

    METRON-1624 Set Profiler and Enrichment batch parameters in Ambari

    METRON-1594 introduced a mechanism to control the batch size and timeout when writing records to Kafka by updating the global properties.  
    
    Both Enrichment and the Profiler write records back into Kafka.  The user can independently set the batch size and timeout for each of those. Since these are global properties, the user must set these using the CLI.
    
        ```
        "profiler.writer.batchSize" : 15,
        "profiler.writer.batchTimeout" : 0,
        "enrichment.writer.batchSize" : 15,
        "enrichment.writer.batchTimeout" : 0
        ```
    
    With this change, the user can now adjust these values in Ambari.
    
    ## Testing
    
    1. Launch the development environment.  Ensure alerts are visible in the Alerts UI and that the Service Check passes.
    
    1. Open the REPL and validate the current value of the global property 'threat.triage.score.field'.  The value here, the default value should be `threat:triage:score`.
    
        ```
        [root@node1 ~]# source /etc/default/metron
        [root@node1 ~]# $METRON_HOME/bin/stellar -z $ZOOKEEPER
        Stellar, Go!
        ...
        [Stellar]>>> globals := CONFIG_GET("GLOBAL")
        {
          ...
          "profiler.writer.batchSize" : "15",
          "profiler.writer.batchTimeout" : "0",
          ...
          "enrichment.writer.batchSize" : "15",
          "enrichment.writer.batchTimeout" : "0",
          ...
        }
        ```
    
    1. Change any of these values in Ambari by going to either... 
    
        * Metron > Configs > Profiler > Kafka
    
            ![screen shot 2018-06-19 at 3 48 27 pm](https://user-images.githubusercontent.com/2475409/41662561-692bfd68-746f-11e8-8e51-bf800a9d8486.png)
    
        * Metron > Configs > Enrichment > Kafka 
             
            ![screen shot 2018-06-19 at 3 48 07 pm](https://user-images.githubusercontent.com/2475409/41662569-6b15ba7e-746f-11e8-8f03-4e9d23c914b2.png)
    
    1. After saving the change, Ambari should prompt for either the Profiler or Enrichment topology to be restarted
    
    1. Restart all affected services.
    
    1. After the services have been restarted, open the REPL and validate that the value of the global property 'threat.triage.score.field' changed in the global config.
    
        ```
        [root@node1 ~]# source /etc/default/metron
        [root@node1 ~]# $METRON_HOME/bin/stellar -z $ZOOKEEPER
        Stellar, Go!
        ...
        [Stellar]>>> globals := CONFIG_GET("GLOBAL")
        {
          ...
          "profiler.writer.batchSize" : "150",
          "profiler.writer.batchTimeout" : "5000",
          ...
          "enrichment.writer.batchSize" : "400",
          "enrichment.writer.batchTimeout" : "10000",
          ...
        }
        ```
    
    ## Pull Request Checklist
    
    - [x] Is there a JIRA ticket associated with this PR? If not one needs to be created at [Metron Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
    - [x] Does your PR title start with METRON-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    - [x] Have you included steps to reproduce the behavior or problem that is being changed or addressed?
    - [x] Have you included steps or a guide to how the change may be verified and tested manually?
    - [x] Have you ensured that the full suite of tests and checks have been executed in the root metron folder via:
    - [x] Have you written or updated unit tests and or integration tests to verify your changes?
    - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
    - [x] Have you verified the basic functionality of the build by building and running locally with Vagrant full-dev environment or the equivalent?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nickwallen/metron METRON-1624

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/metron/pull/1069.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1069
    
----
commit caa8b7d3ec8bca73e007967471a352eae07bcb2b
Author: Nick Allen <ni...@...>
Date:   2018-06-19T19:45:10Z

    METRON-1624 Set Profiler and Enrichment batch parameters in Ambari

----


---

[GitHub] metron pull request #1069: METRON-1624 Set Profiler and Enrichment batch par...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/metron/pull/1069


---

[GitHub] metron issue #1069: METRON-1624 Set Profiler and Enrichment batch parameters...

Posted by justinleet <gi...@git.apache.org>.
Github user justinleet commented on the issue:

    https://github.com/apache/metron/pull/1069
  
    +1 by inspection.  Glad to see these properties made a bit more available!


---