Http input plugin
logstash作为一个数据输入端。提供http服务,接收客户端的http请求,获取发送的内容。
在config目录下新建文件:
vim config/http-input.yml
input {
http {
codec => "json"
ssl => false
port => 8989
}
}
filter {
json {
source => "message"
}
}
output {
stdout { codec => json }
}
启动:
bin/logstash -f ./config/http-input.yml
启动后输出:
[root@ss1 logstash-6.5.4]# bin/logstash -f ./config/http-input.yml
Sending Logstash logs to /root/logstash/logstash-6.5.4/logs which is now configured via log4j2.properties
[2019-04-04T08:52:23,884][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-04-04T08:52:23,925][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.5.4"}
[2019-04-04T08:52:30,433][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2019-04-04T08:52:31,118][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x102cff5e run>"}
[2019-04-04T08:52:31,184][INFO ][logstash.inputs.http ] Starting http input listener {:address=>"0.0.0.0:8989", :ssl=>"false"}
[2019-04-04T08:52:31,291][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2019-04-04T08:52:31,930][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9601}
{"headers":{"request_path":"/","connection":"keep-alive","content_length":"247","request_method":"POST","cache_control":"no-cache","http_version":"HTTP/1.1","postman_token":"7e8dc2ea-f569-42a2-84f4-c53506777c61","content_type":"text/plain","accept_encoding":"gzip, deflate","http_host":"111.111.111.111:8989","http_user_agent":"PostmanRuntime/6.2.5","http_accept":"*/*"},"host":"111.111.111.111","LogType":"maha1","language_type":"heartbeat","LogId":"","ErrorCode":"2","@version":"1","responseLogTime":"2019-04-04 09:40:47.797","srcfile":"c:\\Program.cs","LogMessage":".Net Test","Input":"","Level":"Info","@timestamp":"2019-04-04T08:57:18.780Z"}
另外,logstash有个http poller input,是自己主动去http端点采集数据,如果采集spring boot的jmx服务器监控数据。
参考:
https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html
Http input plugin的更多相关文章
- jQuery Tags Input Plugin 插件的使用
一个jquery开发的标签功能加强插件,可以生成或删除标签,还能对输入重复标签进行检查,和JQuery autocomplete插件配合实现自动完成功能. 官网:http://xoxco.com/pr ...
- Logstash:input plugin 介绍
- Collecting metrics with the PostgreSQL and TimescaleDB output plugin for Telegraf
转自:https://docs.timescale.com/v1.3/tutorials/telegraf-output-plugin 文章演示了如何使用pg output 插件 以及Telegraf ...
- logstash日志分析的配置和使用
logstash是一个数据分析软件,主要目的是分析log日志.整一套软件可以当作一个MVC模型,logstash是controller层,Elasticsearch是一个model层,kibana是v ...
- A session of Log Collect, Retrieval and Analysis using ELK Stack
Motivation 运维过程中对问题的定位往往需要跟踪和定位日志.分布式和弹性计算的引入,使得日志的定位和分析变得越发复杂. 本次实践主要的目的是考察现有成熟的日志收集.检索和分析方案:Kafka+ ...
- 移动端-js触摸事件
开发者工具 在移动开发中,一种较为容易的做法是,先在桌面上开始原型设计,然后再在打算要支持的设备上处理移动特有的部分.多点触摸正是难以在PC上进行测试的那些功能之一,因为大部分的PC都没有触摸输入. ...
- logstash 1.5.3 配置使用redis做续传
logstash是ELK中的一员大将, redis插件也是<The Logstash Book>中介绍的一个很好用的玩意儿. 之前,用比较小的集群部署的时候,没有介入redis中间件,所以 ...
- 移动互联网终端的touch事件,touchstart, touchend, touchmove
如果我们允许用户在页面上用类似桌面浏览器鼠标手势的方式来控制WEB APP,这个页面上肯定是有很多可点击区域的,如果用户触摸到了那些可点击区域怎么办呢??诸如智能手机和平板电脑一类的移动设备通常会有一 ...
- logstash
logstash作为数据搜集器,主要分为三个部分:input->filter->output 作为pipeline的形式进行处理,支持复杂的操作,如发邮件等 input配置数据的输入和简 ...
随机推荐
- 备忘录模式 Memento 快照模式 标记Token模式 行为型 设计模式(二十二)
备忘录模式 Memento 沿着脚印,走过你来时的路,回到原点. 苦海翻起爱恨 在世间难逃避命运 相亲竟不可接近 或我应该相信是缘份 一首<一生所爱>触动了多少 ...
- 驰骋开源的asp.net工作流程引擎java工作流 2015 正文 驰骋工作流引擎ccflow6的功能列表
关键词: 驰骋工作流引擎 ccflow的功能列表 工作流功能列表 表单引擎功能列表 我们工作流引擎ccflow6重构之后对功能做了一些调整,要想快速了解ccbpm的功能,可以以下面列表为准 ...
- 为什么 User 应该翻译为 「使用权人」 ?
User, 旧译「用户」,我在此向大家倡议有条件地选择翻译为「使用权人」. 1. __使用权人__更能反应 User 的本质特征 我们看到一匹马的时候不会说这是一头猪,而 User 的本质是什么?在我 ...
- Webpack4教程 - 第三部分,如何使用插件
转载请注明出处:葡萄城官网,葡萄城为开发者提供专业的开发工具.解决方案和服务,赋能开发者.原文出处:https://wanago.io/2018/07/23/webpack-4-course-part ...
- Linux安装配置Mariadb
一.安装数据库Mariadb 参考:http://blog.51cto.com/12173069/2047746 从最新版本的linux系统开始,默认的是 Mariadb而不是mysql! 使用系统自 ...
- coreRT 和 Native 编译netcore AOT程序
AOT是预编译成本地程序,避免JIT动态编译存在的性能问题. netcore一个吸引人的项目,就是基于coreRt 运行时的本地编译技术,下面我来替大家尝试一下它究竟表现如何. <Project ...
- [转载]——说说IO
本文转载自"和你在一起"的"说说IO"系列文章https://pengjiaheng.iteye.com/,总共分为8篇,特意整理.收录在此,支持原创.尊重原创 ...
- Redis 安装总结记录 附送redis-desktop-manager工具
使用redis已几年有余,之前写过Redis关于master-slave(主从)同步原理的文章.这里介绍下安装过程,因为前前后后有些命令也记不住了,所以此篇文章和之前文章一样起个备注记录作用,也供屏幕 ...
- Swift中 删除Array的元素对象
Swift中Array的删除对象 在Swift中数组Array没有removeObject的方法 1.找到下标 let model_index = selectedArray.index(where: ...
- php微信h5支付超简单!!!
本示例应用于tp3.2版本 不懂私聊我QQ:1195989301 请备注来意! 代码链接 请点击下载 密码: ekd4 不喜欢打字望谅解.....