- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想使用td-agent将haproxy日志发送到fluentd / elasticsearch / kibana,但我无法正确执行
我已经通过docker安装了EFK,并且规则正确。
我有一个日志类型为haproxy.tcp的haproxy,如下所示:
haproxy[27508]: info 127.0.0.1:45111 [12/Jul/2012:15:19:03.258] wss-relay wss-relay/local02_9876 0/0/50015 1277 cD 1/0/0/0/0 0/0
<source>
@type tail
path /var/log/haproxy.log
format /^(?<ps>\w+)\[(?<pid>\d+)\]: (?<pri>\w+) (?<c_ip>[\w\.]+):(?<c_port>\d+) \[(?<time>.+)\] (?<f_end>[\w-]+) (?<b_end>[\w-]+)\/(?<b_server>[\w-]+) (?<tw>\d+)\/(?<tc>\d+)\/(?<tt>\d+) (?<bytes>\d+) (?<t_state>[\w-]+) (?<actconn>\d+)\/(?<feconn>\d+)\/(?<beconn>\d+)\/(?<srv_conn>\d+)\/(?<retries>\d+) (?<srv_queue>\d+)\/(?<backend_queue>\d+)$/
tag haproxy.tcp
time_format %d/%B/%Y:%H:%M:%S
</source>
<match haproxy.tcp>
@type forward
<server>
host dockerdes01
port 24224
</server>
</match>
<match haproxy.tcp>
@type copy
<store>
@type stdout
</store>
<store>
@type elasticsearch
logstash_format true
flush_interval 10s # for testing.
host dockerdes01
port 9200
</store>
</match>
2012-07-12 15:19:03.000000000 +0200 haproxy.tcp: {"ps":"haproxy","pid":"27508","pri":"info","c_ip":"127.0.0.1","c_port":"45111","f_end":"wss-relay","b_end":"wss-relay","b_server":"local02_9876","tw":"0","tc":"0","tt":"50015","bytes":"1277","t_state":"cD","actconn":"1","feconn":"0","beconn":"0","srv_conn":"0","retries":"0","srv_queue":"0","backend_queue":"0"}
最佳答案
最好使用设置为流利的syslog设置,并从haproxy和syslog发送。
关于elasticsearch - 如何发送HAProxy日志到td-agent流利的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58447653/
我正在尝试将fluentd与elasticsearch连接起来,并且在启动td-agent服务时遇到此错误。 td-agent.log: 无法与Elasticsearch通信,重置连接并重试。连接被拒
所以我有一个案例,布局已经变得更加复杂。有一些常见的东西,比如 @section styleIncludes{ ... } ,然后是其他部分,这些部分定义了每个页面可以选择(但几乎总是)指定的各种内容
我刚刚看到一个巨大的 Java 正则表达式,它让我对一般正则表达式的可维护性有所思考。我相信大多数人——除了一些糟糕的 perl 贩子——都会同意正则表达式很难维护。 我在考虑如何解决这种情况。到目前
我有一个 12 秒长的 audio.mp3 文件video.mp4 的长度为 60 秒。 我需要在视频的第 40 秒插入audio.mp3。 如何使用 Node-Fluent-ffmpeg 做到这一点
我正在使用 NHibernate + Fluent 来处理我的应用程序中的数据库。到目前为止,我一直在使用 SessionSource 来创建我的 ISession 对象。我现在对来自 NHibern
我在 Java 控制台应用程序中使用 Apache HttpClient 4.5(具有流畅的界面)。我注意到,它的默认超时值似乎是无限的,但我必须为我发送的请求使用非无限的超时值。我想对所有请求使用相
这是我的路线: router.get("answers","delete", Int.parameter) { req -> Future in let answerID = try
我有随机“ session 已关闭!” Autofac 和 Fluent nHibernate 的以下配置错误: 全局.asax.cs: builder.Register(x => new NHibe
我是一名优秀的程序员,十分优秀!