Filebeat的http endpoint input
Filebeat的input终于支持了http,可以使用post请求向filebeat的input传输数据,不过现在还是处于beta版本
参考
1 | https: //www .elastic.co /guide/en/beats/filebeat/7 .x /filebeat-input-http_endpoint .html |
下载filebeat最新版本,然后解压
1 | wget https: //artifacts .elastic.co /downloads/beats/filebeat/filebeat-7 .9.2-linux-x86_64. tar .gz |
配置 filebeat_http.yml
1 2 3 4 5 6 7 8 9 10 | filebeat.inputs: - type : http_endpoint enabled: true listen_address: localhost listen_port: 19080 #----------------------------------File output--------------------------------# output. file : path: "/tmp/filebeat" filename: filebeat |
给配置文件赋权
1 | chmod go-w . /filebeat_http .yml |
启动filebeat
1 | . /filebeat -e -c filebeat_http.yml |
向19080端口发送post请求
1 2 | curl -XPOST http: //localhost :19080 -H 'Content-Type:application/json' -d '{"a":"b"}' { "message" : "success" } |
不支持get请求
去/tmp/filebeat中查看
1 2 | lintong@master: /tmp/filebeat $ tail -n 100 filebeat { "@timestamp" : "2020-10-10T09:44:22.294Z" , "@metadata" :{ "beat" : "filebeat" , "type" : "_doc" , "version" : "7.9.2" }, "json" :{ "a" : "b" }, "input" :{ "type" : "http_endpoint" }, "ecs" :{ "version" : "1.5.0" }, "host" :{ "name" : "master" }, "agent" :{ "hostname" : "master" , "ephemeral_id" : "20bf06ed-3421-44b8-aeaf-bb5d54565eb3" , "id" : "78e98f32-c8ce-4505-b75e-c98f373a2205" , "name" : "master" , "type" : "filebeat" , "version" : "7.9.2" }} |
本文只发表于博客园和tonglin0325的博客,作者:tonglin0325,转载请注明原文链接:https://www.cnblogs.com/tonglin0325/p/13794532.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 字符编码:从基础到乱码解决