Metron性能调优指南(Metron Performance Tuning Guide)

概述

Storm拓扑的扩展设置用于hadoop中的stremming,enriching,indexing和存储遥感数据。

Metron性能调优指南(Metron Performance Tuning Guide)

https://metron.apache.org/current-book/metron-platform/Performance-tuning-guide.html

放个网址在这,有空再说吧。

通用

目录

Stellar Language(Stellar语言)
High Level Architecture (高级体系架构)
Global Configuration (全局设置)
Validation Framework (验证框架)
Management Utility (管理工具)
Topology Errors (拓扑错误)
Performance Logging (性能日志)
Metron Debugging

Stellar 语言

用于简单的计算和转换,一种简单的,小型的DSL(Domain Specified Language)领域专用语言。
以下是原文供参考

The query language supports the following:
Referencing fields in the enriched JSON
String literals are quoted with either ' or ", and support escaping for ', ", \t, \r, \n, and backslash
Simple boolean operations: and, not, or
Boolean expressions are short-circuited (e.g. true or FUNC() would never execute FUNC)
Simple arithmetic operations: *, /, +, - on real numbers or integers
Simple comparison operations <, >, <=, >=
Simple equality comparison operations ==, !=
if/then/else comparisons (i.e. if var1 < 10 then 'less than 10' else '10 or more')
Determining whether a field exists (via exists)
An in operator that works like the in in Python
The ability to have parenthesis to make order of operations explicit
User defined functions, including Lambda expressions
For documentation of Stellar, please see the Stellar README.

HLA

Apache Metron 是 kappa architecture(见附注),主要依靠Storm和Kafka。此外还依赖以下组件:
zookeeper用于storm的拓普的动态设置更新
Hbase主要用于enrichment(富化),也会用于存储UI的用户状态
HDFS用于存储长期数据,转换和富化的数据存在这里,以及其它在过程中上报的异常或者错误。
Solr ES(加上Kibana)用于实时访问。提供了同时包括ES和Solr的兼容性,以及kibana上可定制的仪表盘用于数据探索。
Zeppelin提供用于定制数据分析的仪表盘。
将数据引入metron主要通过kafka 的topic完成。

注:
Kappa架构的核心思想包括以下三点:

用Kafka或者类似的分布式队列系统保存数据,你需要几天的数据量就保存几天。

当需要全量重新计算时,重新起一个流计算实例,从头开始读取数据进行处理,并输出到一个新的结果存储中。

当新的实例做完后,停止老的流计算实例,并把老的一些结果删除。

没有批处理,只有流处理

全局设置(Global Configuration)

[root@node01 zookeeper]# cat global.json
{
  "es.clustername" : "metron",
  "es.ip" : "node01.bdp:9300",
  "es.date.format" : "yyyy.MM.dd",
  "parser.error.topic" : "indexing",
  "update.hbase.table" : "metron_update",
  "update.hbase.cf" : "t",
  "es.client.settings" : {
    "client.transport.ping_timeout" : "500s"
  },
  "profiler.client.period.duration" : "15",
  "profiler.client.period.duration.units" : "",
  "user.settings.hbase.table" : "user_settings",
  "user.settings.hbase.cf" : "cf",
  "geo.hdfs.file" : "/apps/metron/geo/GeoLite2-City.mmdb.gz",
  "es.async.bulk.size" : "10000",
  "es.async.concurrent.num" : "8",
  "es.flush.ms" : "1"
}

存在zookeeper里

验证框架(Validation Framework)

在全局设置中,用于确认所有的来自于转换器的消息的合法性的验证框架。通过。。。
有空再专门说吧。总之是在global configuration中以validation设置的

管理工具类(Management Utility)

设置应当被存储在以下的位置(从$BASE_DIR开始)

  • global.json
  • sensors(探针):子文件夹,包含sensor的enrichment设置json(比如:snort.json,bro.json)
    默认情况下,如果用ansible架构部署的话,该文件夹位置为 $METRON_HOME/config/zookeeper
    当设置存储在硬盘上时,需要载入到zookeeper中才能发挥作用。可以用$METRON_HOME/bin/zk_load_config.sh这个脚本来达到该目的
    以下为参数
 -c,--config_type <CONFIG_TYPE>            The configuration type: GLOBAL,
                                           PARSER, ENRICHMENT, INDEXING,
                                           PROFILER
 -f,--force                                Force operation
 -h,--help                                 Generate Help screen
 -i,--input_dir <DIR>                      The input directory containing
                                           the configuration files named
                                           like "$source.json"
 -m,--mode <MODE>                          The mode of operation: DUMP,
                                           PULL, PUSH, PATCH
 -n,--config_name <CONFIG_NAME>            The configuration name: bro,
                                           yaf, snort, squid, etc.
 -o,--output_dir <DIR>                     The output directory which will
                                           store the JSON configuration
                                           from Zookeeper
 -pk,--patch_key <PATCH_KEY>               The key to modify
 -pm,--patch_mode <PATCH_MODE>             One of: ADD, REMOVE - relevant
                                           only for key/value patches,
                                           i.e. when a patch file is not
                                           used.
 -pf,--patch_file <PATCH_FILE>             Path to the patch file.
 -pv,--patch_value <PATCH_VALUE>           Value to use in the patch.
 -z,--zk_quorum <host:port,[host:port]*>   Zookeeper Quorum URL
                                           (zk1:port,zk2:port,...)

用例:

将已有的设置从zookeeper落盘到单点vargant机器: $METRON_HOME/bin/zk_load_configs.sh -z node1:2181 -m DUMP
。。。

Topology Errors (拓扑错误) Performance Logging (性能日志) Metron Debugging

不看了啊,拓扑错误很容易理解,性能日志和Metron 调试再说

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值