fluent-plugin-gcloud-pubsub icon indicating copy to clipboard operation
fluent-plugin-gcloud-pubsub copied to clipboard

two topics in one conf

Open randyh0329 opened this issue 9 years ago • 1 comments

Hi I am using this output plugin to send different logs to different pub topics. following are my td-agent.conf

<match tag1.xxx>
  @type copy
  <store>
    .....
  </store>
  <store>
    type gcloud_pubsub
    project my.project
    topic my.topic1
    key my.key
    flush_interval 1
  </store> 
</match>

<match tag2.xxx>
  @type copy
  <store>
    .....
  </store>
  <store>
    type gcloud_pubsub
    project my.project
    topic my.topic2
    key my.key
    flush_interval 1
  </store> 
</match>

Then fluentd will keep restarting, looks like the configuration is conflict. Any ideas?

randyh0329 avatar Apr 28 '16 07:04 randyh0329

Hi @randyh0329 we had the similar problem.

What we have found that problem is in gcloud gem (used by the plugin).

What version of gcloud do you use?

For instance the latest version of gcloud 0.9.0 depends on 'google-protobuf' which was not the case in v0.4.1. So the conflict happens when you use fluentd via td-agent. Because in the startup script td-agent assigns LD_PRELOAD to jemalloc replacing the default malloc. So if you use just fluentd you should not have any problems with your configuration. If use fluentd from td-agent then you could have this problem

You could try to comment out the line in you init.d td-agent config and restart it and test it, this solved our problem.

mshytikov avatar May 19 '16 12:05 mshytikov