DataDog / fluent-plugin-datadog

Fluentd output plugin for Datadog: https://www.datadog.com
Apache License 2.0
39 stars 26 forks source link

Unknown output plugin 'datadog'. Run 'gem search -rd fluent-plugin' to find plugins #31

Closed nodesocket closed 4 years ago

nodesocket commented 5 years ago

Installed with:

gem install fluent-plugin-datadog

Add the config:

<match datadog.**>

    @type datadog
    @id awesome_agent
    api_key <api-key-here>

    # Optional
    include_tag_key true
    tag_key 'tag'

</match>

When attempting to restart the service, it fails with:

2019-10-21 18:29:17 +0000 [error]: config error file="/etc/google-fluentd/google-fluentd.conf" error_class=Fluent::ConfigError error="Unknown output plugin 'datadog'. Run 'gem search -rd fluent-plugin' to find plugins"
nodesocket commented 4 years ago

Fixed. The problem was using google-fluentd and that it uses an embedded ruby. The fix was to specify the proper gems directory to install into:

export GEM_HOME=/opt/google-fluentd/embedded/lib/ruby/gems/2.4.0
gem install --verbose fluent-plugin-datadog