用例是这样的:我运行了几个java应用程序,它们都必须与不同的(每个都有一个特定的目标)elasticsearch索引进行交互.例如,应用程序A使用ElasticSearch的索引A,B,C来查询和更新.应用B使用指数A,C,D(比如说).
需要一些通用接口来管理所有这些数据流.目前我正在评估卡夫卡,并为此目的流利.有人可以解释哪种更适合这种情况.我看过Kafka和Fluentd的特点,我真的不明白它在这里会有什么区别.非常感谢.
我们如何轻松地使用这样的流利(和插件)进行转换
{
    "remote": "87.85.14.126",
    "city": "saint-hubert"
}
对此:
{
   "geoip": {
       "remote": "87.85.14.126",
       "city": "saint-hubert"
   }
}
谢谢
通过阅读12factor中的以下帖子,我想出了一个问题,我想检查一下你们如何处理这个问题.
基本上,应用程序应直接写入stdout/stderr.反正将这些流直接重定向到流畅(不绑定到rsyslog/syslog)?随着我越来越清楚流利,我相信它将成为来自多个应用/平台的日志聚合的绝佳工具.
这样做的主要原因是,如果应用程序是跨平台的,则rsyslog/syslog可能不可用,并且据我所知,使用日志框架(需要使用它们所需的配置)将违反12factor.
谢谢!
我对如何在kubernetes中设置错误报告感到困惑,因此在Google Cloud Console/Stackdriver"错误报告"中可以看到错误?
根据文档 https://cloud.google.com/error-reporting/docs/setting-up-on-compute-engine, 我们需要启用流畅的"转发输入插件",然后从我们的应用程序发送异常数据.我认为如果我们自己设置了流畅的设置,这种方法会有效,但它已经预先安装在只运行gcr.io/google_containers/fluentd-gcp docker image的pod中的每个节点上.
我们如何在这些pod上启用前向输入并确保节点上的每个pod都可以使用http端口?我们还需要确保在向集群添加更多节点时默认使用此配置.
任何帮助将不胜感激,可能是我从错误的角度看待这一切?
我正在尝试使用流利的Docker环境创建一个集中式日志系统.目前,我能够使用流畅的docker日志驱动程序将docker日志发送到流畅的日志驱动程序,与使用in_tail方法读取docker日志文件相比,这是一个更清晰的解决方案.但是,我目前正面临多行日志问题.
从上图中可以看出,多行日志无序,这对用户来说非常困惑.有什么办法可以解决这个问题吗?
谢谢.
CW
我有一些 JSON 通过 FluentD 驱动程序从 docker 容器发出,例如:
'{"timeMillis":1485917543709,"thread":"main","level":"INFO","loggerName":"com.imageintelligence.ava.api.Boot","message":"{\"dom\":\"DOM\"}","loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":1,"threadPriority":5}'
请注意该message字段是字符串编码的 JSON?当这些数据被 fluentD 捕获时,它最终看起来像这样,正如预期的那样:
2017-02-01 06:29:15 +0000 docker.6faad650faa6: {"log":"{\"timeMillis\":1485917543709,\"thread\":\"main\",\"level\":\"INFO\",\"loggerName\":\"com.imageintelligence.ava.api.Boot\",\"message\":\"{\\\"dom\\\":\\\"DOM\\\"}\",\"loggerFqcn\":\"org.apache.logging.slf4j.Log4jLogger\",\"threadId\":1,\"threadPriority\":5}\r","com.amazonaws.ecs.cluster":"dombou","container_id":"6faad650faa6012af4f32df79901b42488543a5e6e53517fe3579b01ab2b6862","container_name":"/upbeat_booth","source":"stdout"}`
我使用这样的过滤器来解析 JSON:
<filter docker.**>
  @type parser
  format json
  key_name log
  reserve_data true
  hash_value_field log
</filter>
我最终得到了半消毒的 JSON:
2017-02-01 06:32:10 +0000 docker.68c794f7f694: {"source":"stdout","log":{"timeMillis":1485917543709,"thread":"main","level":"INFO","loggerName":"com.imageintelligence.ava.api.Boot","message":"{\"dom\":\"DOM\"}","loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","threadId":1,"threadPriority":5},"com.amazonaws.ecs.cluster":"dombou","container_id":"68c794f7f6948d4261b9497947834651abbf766e9aa51a76f39d6895b7a9ac18","container_name":"/sad_hamilton"}
问题是,该message字段仍然是字符串转义的 JSON 字段。关于如何解析内部 JSON 字段的任何建议?如何堆叠过滤器?
我想知道如何在Fluentd配置中使用env vars,我试过:
<match **>
type elasticsearch
logstash_format true
logstash_prefix $ENV_VAR
host ***
port ***
include_tag_key true
tag_key _key
</match>
但它不起作用,任何想法?
I am using fluentd to centralize log messages in elasticsearch and view them with kibana. When I view log messages, messages that occured in the same second are out of order and the milliseconds in @timestamp is all zeros
2015-01-13T11:54:01.000-06:00   DEBUG   my message
How do I get fluentd to store milliseconds?
我目前有以下配置:
<match docker.nginx>
  @type rewrite_tag_filter
  rewriterule1 source stdout docker.nginx.stdout
  rewriterule2 source stderr docker.nginx.stderr
</match>
但这意味着,每个容器我必须做同样的事情.
这不起作用,但可能你会得到我想要的东西:
<match docker.*>
  @type rewrite_tag_filter
  rewriterule1 source stdout docker.*.stdout
  rewriterule2 source stdout docker.*.stderr
</match>
所以我的问题是我可以以某种方式引用匹配块中匹配的标签吗?因此,如果它是nginx/rabbitmq/zookeeper/anything,它会将所有事件流拆分为docker.<fluentd-tag>.stdout和stderr.
提前致谢!
已配置的Google Stackdriver登录其中一个GCE VM,一切正常,但日志级别除外.在文件中使用了参数log_level
/etc/google-fluentd/config.d/tomcat.conf
按照http://docs.fluentd.org/articles/in_tail中的规定, 但即使这样,在Console Log Viewer中也无法查看不同级别的日志.有没有特定的方法为Google Cloud配置流畅的代理?
google-compute-engine fluentd google-cloud-platform stackdriver
fluentd ×10
logging ×3
docker ×2
stackdriver ×2
12factor ×1
apache-kafka ×1
gcloud ×1
json ×1
kibana ×1
kubernetes ×1