我对 fluentd twitter 插件有疑问。它告诉我'access_token' parameter is required,但我已经给了它 access_token 。
这是我的/etc/td-agent/td-agent.conf(我重新生成了密钥和秘密,所以可以显示它。)
<source>
@type twitter
consumer_key CmHQ2sJOoqtkp3ePdqrBySQQ6
consumer_secret SoUzVvNe6BjzNH554qTupK849Wgsub31wMRtDBGF1M1Ldh9HiY
oauth_token 1351694296613679104-2PEN0LoOzeDN1qlxS2p3IPBchEQDah
oauth_token_secret oNqwr57MU5TGb21P1MEU4GfgcITDOs1LmgN5tYiPlfHcG
tag input.twitter.sampling
timeline sampling
keyword game
output_format nest
</source>
<match input.twitter>
@type stdout
</match>
这是我执行时的日志td-agent
~$ td-agent
2021-01-20 07:13:09 +0000 [info]: parsing config file is succeeded path="/etc/td-agent/td-agent.conf"
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-elasticsearch' version '4.1.1'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-kafka' version '0.14.1'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-prometheus' version '1.8.2'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-prometheus_pushgateway' version '0.0.2'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-record-modifier' version '2.1.0'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '2.3.0'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-s3' version '1.4.0'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-systemd' version '1.0.2'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-td' version '1.1.0'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-twitter' version '0.6.1'
2021-01-20 07:13:09 +0000 [info]: gem 'fluent-plugin-webhdfs' version '1.2.5'
2021-01-20 07:13:09 +0000 [info]: gem 'fluentd' version '1.11.2'
2021-01-20 07:13:09 +0000 [error]: config error in:
<source>
@type twitter
consumer_key xxxxxx
consumer_secret xxxxxx
oauth_token 1351694296613679104-2PEN0LoOzeDN1qlxS2p3IPBchEQDah
oauth_token_secret oNqwr57MU5TGb21P1MEU4GfgcITDOs1LmgN5tYiPlfHcG
tag "input.twitter.sampling"
timeline sampling
keyword "game"
output_format nest
</source>
2021-01-20 07:13:09 +0000 [error]: config error file="/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="'access_token' parameter is required"