You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by rm...@apache.org on 2018/06/26 15:40:12 UTC
[05/19] metron git commit: METRON-1599 Allow user to define global
property 'source.type.field' in Ambari (nickwallen) closes apache/metron#1047
METRON-1599 Allow user to define global property 'source.type.field' in Ambari (nickwallen) closes apache/metron#1047
Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/74273488
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/74273488
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/74273488
Branch: refs/heads/feature/METRON-1554-pcap-query-panel
Commit: 742734885a215a4a9a363b8e5a88c37fd8e3010d
Parents: 36b2029
Author: nickwallen <ni...@nickallen.org>
Authored: Tue Jun 19 12:28:43 2018 -0400
Committer: nickallen <ni...@apache.org>
Committed: Tue Jun 19 12:28:43 2018 -0400
----------------------------------------------------------------------
.../METRON/CURRENT/configuration/metron-rest-env.xml | 6 ++++++
.../METRON/CURRENT/package/scripts/metron_service.py | 5 +++++
.../METRON/CURRENT/package/scripts/params/params_linux.py | 1 +
.../METRON/CURRENT/themes/metron_theme.json | 10 ++++++++++
metron-platform/metron-common/README.md | 2 +-
5 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/metron/blob/74273488/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-rest-env.xml
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-rest-env.xml b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-rest-env.xml
index 78ea27e..c636fb1 100644
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-rest-env.xml
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/configuration/metron-rest-env.xml
@@ -156,4 +156,10 @@
<description>The HBase column family which will hold user settings in HBase.</description>
<display-name>User Settings HBase Column Family</display-name>
</property>
+ <property>
+ <name>source_type_field</name>
+ <display-name>Source Type Field Name</display-name>
+ <description>The field name where the source type can be found in the search indices. This setting primarily affects the Alerts UI.</description>
+ <value>source:type</value>
+ </property>
</configuration>
http://git-wip-us.apache.org/repos/asf/metron/blob/74273488/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py
index 894ba44..9e6480c 100644
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/metron_service.py
@@ -109,6 +109,11 @@ def build_global_config_patch(params, patch_file):
"op": "add",
"path": "/bootstrap.servers",
"value": "{{kafka_brokers}}"
+ },
+ {
+ "op": "add",
+ "path": "/source.type.field",
+ "value": "{{source_type_field}}"
}
]
"""
http://git-wip-us.apache.org/repos/asf/metron/blob/74273488/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py
index f44d05f..bae00dd 100755
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/params/params_linux.py
@@ -254,6 +254,7 @@ metron_rest_classpath = config['configurations']['metron-rest-env']['metron_rest
metron_sysconfig = config['configurations']['metron-rest-env']['metron_sysconfig']
user_settings_hbase_table = status_params.user_settings_hbase_table
user_settings_hbase_cf = status_params.user_settings_hbase_cf
+source_type_field = config['configurations']['metron-rest-env']['source_type_field']
# Enrichment
metron_enrichment_topology = status_params.metron_enrichment_topology
http://git-wip-us.apache.org/repos/asf/metron/blob/74273488/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/themes/metron_theme.json
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/themes/metron_theme.json b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/themes/metron_theme.json
index 06bc155..be2c14b 100644
--- a/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/themes/metron_theme.json
+++ b/metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/themes/metron_theme.json
@@ -792,6 +792,10 @@
"subsection-name": "subsection-rest"
},
{
+ "config": "metron-rest-env/source_type_field",
+ "subsection-name": "subsection-rest"
+ },
+ {
"config": "metron-management-ui-env/metron_management_ui_port",
"subsection-name": "subsection-management-ui"
},
@@ -833,6 +837,12 @@
}
},
{
+ "config": "metron-rest-env/source_type_field",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
"config": "metron-parsers-env/parsers",
"widget": {
"type": "text-field"
http://git-wip-us.apache.org/repos/asf/metron/blob/74273488/metron-platform/metron-common/README.md
----------------------------------------------------------------------
diff --git a/metron-platform/metron-common/README.md b/metron-platform/metron-common/README.md
index dae2e22..41e2c30 100644
--- a/metron-platform/metron-common/README.md
+++ b/metron-platform/metron-common/README.md
@@ -100,7 +100,7 @@ but a convenient index is provided here:
| [`enrichment.writer.batchSize`](../metron-enrichment#enrichmentwriterbatchsize) | Enrichment | Integer | N/A |
| [`enrichment.writer.batchTimeout`](../metron-enrichment#enrichmentwriterbatchtimeout) | Enrichment | Integer | N/A |
| [`geo.hdfs.file`](../metron-enrichment#geohdfsfile) | Enrichment | String | `geo_hdfs_file` |
-| [`source.type.field`](../../metron-interface/metron-alerts#sourcetypefield) | UI | String | N/A |
+| [`source.type.field`](../../metron-interface/metron-alerts#sourcetypefield) | UI | String | `source_type_field` |
## Note Configs in Ambari
If a field is managed via ambari, you should change the field via