GitHub user nickwallen opened a pull request:

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

    METRON-1599 Allow user to define global property 'source.type.field' in 
Ambari

    The user can specify the name of the message field containing the source 
type in the global configuration.  This is used by the Alerts UI.
    
    Currently this necessitates a user using the CLI to add the field. This 
property should be exposed to the user via Ambari.  The user should be able to 
define this property directly in Ambari.
    
    ## Testing
    
    1. Launch the development environment.
    
    1. Open the REPL and validate the current value of the global property 
'source.type.field'.
    
        ```
        [root@node1 ~]# source /etc/default/metron
        [root@node1 ~]# $METRON_HOME/bin/stellar -z $ZOOKEEPER
        Stellar, Go!
        ...
        [Stellar]>>> globals := CONFIG_GET("GLOBAL")
        {
          ...
          "source.type.field" : "source.type",
          ...
        }
        ```
    
    1. Change the value in Ambari, then restart the Alerts UI using Ambari.
    
        ![screen shot 2018-06-04 at 2 23 29 
pm](https://user-images.githubusercontent.com/2475409/40934473-e241db10-6802-11e8-9526-be4ef156c59f.png)
    
    1. Open the REPL and validate that the value of the global property 
'source.type.field' changed in the global config.
    
        ```
        [Stellar]>>> globals := CONFIG_GET("GLOBAL")
        {
          ...
          "source.type.field" : "source:type",
          ...
        }
        ```
    
    ## Pull Request Checklist
    
    - [ ] 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).
    - [ ] 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.
    - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    - [ ] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
    - [ ] Have you included steps or a guide to how the change may be verified 
and tested manually?
    - [ ] Have you ensured that the full suite of tests and checks have been 
executed in the root metron folder via:
    - [ ] Have you written or updated unit tests and or integration tests to 
verify your changes?
    - [ ] 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)?
    - [ ] 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-1599

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

    https://github.com/apache/metron/pull/1047.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 #1047
    
----
commit 20df52f4b1a7cbd44bd647552d1737b4ec8d40c6
Author: Nick Allen <nick@...>
Date:   2018-06-04T18:07:36Z

    METRON-1599 Allow user to define global property 'source.type.field' in 
Ambari

----


---

Reply via email to