I’m trying to get fluentd to send messages to slack. I installed fluentd via curl and fluentd-plugin-slack via fluent-gem install fluent-plugin-slack however, I’m getting these errors when trying to systemctl start fluentd:
2024-06-03 21:05:47 +0000 [warn]: 'time_format' specified without 'time_key', will be ignored
/opt/fluent/lib/ruby/gems/3.2.0/gems/fluent-plugin-slack-0.6.7/lib/fluent/plugin/out_slack.rb:137:in `configure': undefined method `unescape' for URI:Module (NoMethodError)
@channel = URI.unescape(@channel) # old version compatibility
^^^^^^^^^
My /etc/fluent/fluentd.conf looks like this:
<source>
@type tail
path /var/log/secure
pos_file /var/log/td-agent/selinux_secure.pos
tag selinux.secure
<parse>
@type syslog
</parse>
</source>
<match selinux.secure>
@type copy
<store>
@type stdout
</store>
<store>
@type slack
webhook_url $SLACK_WEBHOOK_URL
channel $SLACK_CHANNEL
message_keys message
flush_interval 5s
buffer_chunk_limit 1m
buffer_queue_limit 1
</store>
</match>
Any ideas? (edited)
1