惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
Hacker News: Ask HN
Hacker News: Ask HN
C
Cisco Blogs
P
Privacy & Cybersecurity Law Blog
C
CERT Recently Published Vulnerability Notes
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
Lohrmann on Cybersecurity
T
Threat Research - Cisco Blogs
Schneier on Security
Schneier on Security
S
Securelist
N
News | PayPal Newsroom
I
Intezer
H
Hacker News: Front Page
P
Privacy International News Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
A
About on SuperTechFans
P
Proofpoint News Feed
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Project Zero
Project Zero
Cloudbric
Cloudbric
N
News and Events Feed by Topic
大猫的无限游戏
大猫的无限游戏
Attack and Defense Labs
Attack and Defense Labs
博客园 - 叶小钗
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
月光博客
月光博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
博客园 - Franky
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
Google DeepMind News
Google DeepMind News
I
InfoQ
有赞技术团队
有赞技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
Microsoft Azure Blog
Microsoft Azure Blog
S
Security Affairs
Apple Machine Learning Research
Apple Machine Learning Research
腾讯CDC
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Vulnerabilities – Threatpost
T
The Blog of Author Tim Ferriss
Scott Helme
Scott Helme

博客园 - wishma

SOAR平台初探(一) Elasticsearch 填坑记 IBM TBSM 业务关联规则配置一例 免费实用微软系统工具集推荐(转) Netcool/OMNIbus Probe脚本编写例子(1) VMware vSphere开发(2)配置VMware vSphere Web Services SDK的开发环境 VMware vSphere开发(1)安装配置VMware vSphere Web Services SDK的运行环境 数字电视业务PSI/SI学习系列(转) SMI-S存储管理协议资料 strus2格式化数字和日期(转) - wishma - 博客园 IPhone数据库操作代码例子 NSDate常用代码范例 64位windows7连接网络共享打印机的问题 IPhone 视图切换的的2种方法 我的D630,安装MAC经历 Eclipse快捷键大全(转贴) (转贴)JIRA安装和破解,随便看看吧 CentOS上安装Tomcat,切换JDK的方法 哥不是间谍,哥只是在找信号!(转贴有意思)
Logstash和Flume-NG Syslog接收小测试
wishma · 2018-11-01 · via 博客园 - wishma

目前在大规模日志处理平台中常见的日志采集器可以采用Logstash或Flume。这两种日志采集器架构设计理念基本相似,都采用采集-过滤处理-输出的方式。下面对这两种采集器Syslog接收性能做个简单测试,供大家参考。

  •  测试过程

基本测试过程是使用2台机器,1台负责发送Syslog数据包,一台采集器。

在采集器上分别安装ELK套件和Apache Flume 1.8.0软件。

Logstash采集配置如下:

input {

  udp {

   host => "0.0.0.0"

   port => "514"

   type => "syslog"

   codec => plain { charset => "UTF-8" }

  }

}

output {

  elasticsearch { 

      hosts => ["10.0.190.109:9200"] 

      document_type => "syslog"

  }

}

Flume-NG采集配置如下:

a1.sources = r1

a1.sinks = k1

a1.channels = c1

# Describe/configure the source

a1.sources.r1.type = syslogudp

a1.sources.r1.port = 5140

a1.sources.r1.host = 10.0.190.109

a1.sources.r1.channels = c1

# Describe the sink

a1.sinks.k1.type = file_roll

a1.sinks.k1.channel = c1

a1.sinks.k1.sink.directory = /opt/flumelog

# Use a channel which buffers events in memory

a1.channels.c1.type = memory

a1.channels.c1.capacity = 1000

a1.channels.c1.transactionCapacity = 100

# Bind the source and sink to the channel

a1.sources.r1.channels = c1

a1.sinks.k1.channel = c1

重点来了,从测试机连续发送Syslog数据包,连续发送1000次,多次验证测试结果可以发现:

ELK中可以基本接收到1000条。

Flume可以接收到并写入本地文件200到350条之间。上述两者差别主要在于Logstash接收并写入ES中,Flume接收并写入本地文件(写入ES太麻烦,Flume的ES Sink模块不兼容最新的ES版本)。

但是把配置中a1.sources.r1.type = syslogudp改成a1.sources.r1.type = syslogtcp,在测试机发送tcp格式的syslog数据包基本可以收到1000条。

以上只是个小小的测试,供大家参考。