首页 > 解决方案 > 坚持尝试通过 google-fluentd.conf 自定义堆栈驱动程序的日志实体

问题描述

这是我的配置文件:

@include config.d/*.conf

<source>
  @type prometheus
  port 24231
</source>
<source>
  @type prometheus_monitor
</source>

<match fluent.**>
  @type null
</match>

<filter **>
  @type add_insert_ids
</filter>

<filter **>
  @type record_transformer
  enable_ruby
  <record>
    logging.googleapis.com/labels foo=bar
    severity info
  </record>
</filter>

<match docker>
  @type google_cloud
  buffer_type file
  buffer_path /var/log/google-fluentd/buffers
  buffer_chunk_limit 512KB
  flush_interval 5s
  disable_retry_limit false
  retry_limit 3
  retry_wait 10
  max_retry_wait 300
  num_threads 8
  use_grpc true
  partial_success true
  enable_monitoring true
  monitoring_type prometheus
</match>

如您所见,它与默认版本完全相同,但有一些调整。

ESP,额外的<filter>状态,当我尝试向日志输出添加严重性和标签时,但似乎没有任何改变。我什么时候错了?我跟着官方文档,顺便说一句。

先感谢您

标签: logginggoogle-compute-enginefluentstackdriver

解决方案


推荐阅读