logstash高可用体现为不丢数据(前提为服务器短时间内不可用后可恢复比如重启服务器或重启进程),具体有两个方面: 进程重启(服务器重启) 事件消息处理失败 在logstash中对应的解决方案为: Persistent Queues Dead Letter Queues 默认都没有开启: 另外可以通过docker或marathon或systemd来实现进程的自动重启: As data flows through the event processing pipeline, Logstash m…
一个logstash很容易通过http打断成两个logstash实现跨服务器或者跨平台间数据同步,比如原来的流程是 logstash: nginx log -> kafka 打断成两个是 logstash1: nginx log -> http out logstash2: http in ->kafka 具体如下 http out filter {    ruby {      code => "event.cancel if not event.get('messag…
Logstash 6.6.2 官方:https://www.elastic.co/products/logstash 一 简介 Centralize, Transform & Stash Your Data Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and…
应用一:mysql数据增量同步到kafka 1 准备mysql测试表 mysql> create table test_sync(id int not null auto_increment, name varchar(32), description varchar(64), create_time timestamp, update_time timestamp, primary key(id)); Query OK, 0 rows affected (0.04 sec) mysql> i…
有两种方式来监控logstash: api ui(xpack) When you run Logstash, it automatically captures runtime metrics that you can use to monitor the health and performance of your Logstash deployment.You can use the basic monitoring APIs provided by Logstash to retrieve…
从nginx日志中进行url解析 /v1/test?param2=v2&param3=v3&time=2019-03-18%2017%3A34%3A14->{'param1':'v1','param2':'v2','param3':'v3','time':'2019-03-18 17:34:14'} nginx日志示例: 1.119.132.168 - - [18/Mar/2019:09:13:50 +0000] "POST /param1/test?param2=1&am…
logstash input插件之mongodb是第三方的,配置如下: input { mongodb { uri => 'mongodb://mongo_server:27017/db' placeholder_db_dir => '/path/to/db_dir/' placeholder_db_name => 'table.db' collection => 'table' batch_size => 5000 } } 安装 ./logstash-plugin inst…
核心枚举 public enum ServerState { LOOKING, FOLLOWING, LEADING, OBSERVING; } zookeeper服务器状态:刚启动LOOKING,follower是FOLLOWING,leader是LEADING,observer是OBSERVING: public enum LearnerType { PARTICIPANT, OBSERVER; } 简单来说,zookeeper启动的核心类是QuorumPeerMain,启动之后会加载配置,…
对文件进行词频统计,是一个大数据领域的hello word级别的应用,来看下实现有多简单: 1 Linux单机处理 egrep -o "\b[[:alpha:]]+\b" test_word.log|sort|uniq -c|sort -rn|head -10 2 Spark分布式处理(Scala) val sparkConf = new SparkConf() val sc = new SparkContext(sparkConf) sc.textFile("test_wo…
impala2.12 官方:http://impala.apache.org/ 一 简介 Apache Impala is the open source, native analytic database for Apache Hadoop. Impala is shipped by Cloudera, MapR, Oracle, and Amazon. impala是hadoop上的开源分析性数据库:C++和java语言开发: Do BI-style Queries on Hadoop Im…