olafnorge / fluent-plugin-rollbar

Fluentd Plugin to forward rollbar payloads to https://rollbar.com/
MIT License
7 stars 5 forks source link

Plugin Installation #1

Open akhon opened 7 years ago

akhon commented 7 years ago

Hey,

What is actual process to install this plugin?

# td-agent-gem install fluent-plugin-rollbar
ERROR:  Could not find a valid gem 'fluent-plugin-rollbar' (>= 0) in any repository
ERROR:  Possible alternatives: fluent-plugin-solr, fluent-plugin-order, fluent-plugin-tailer, fluent-plugin-growl, fluent-plugin-groonga
# td-agent-gem install fluentd-plugin-rollbar

Thanks

olafnorge commented 7 years ago

Hi,

you need to copy the contents of lib/fluent/plugin to your plugins folder. I currently only use it in a docker container. My Dockerfile looks like:

FROM fluent/fluentd:v0.14.15-onbuild

WORKDIR /home/fluent
ENV PATH /home/fluent/.gem/ruby/2.3.0/bin:$PATH

USER root
RUN apk add --no-cache --virtual .build-deps \
        build-base \
        openssl-dev \
        ruby-dev \
        sudo \
    && apk add --no-cache --virtual .run-deps \
        ca-certificates \
        libstdc++ \
        openssl \
    && sudo -u fluent fluent-gem install \
                      eventmachine \
                      em-http-request \
    && rm -rf /home/fluent/.gem/ruby/2.3.0/cache/*.gem \
    && sudo -u fluent gem sources -c \
    && apk del .build-deps

EXPOSE 24284

USER fluent
CMD exec fluentd -c /fluentd/etc/$FLUENTD_CONF -p /fluentd/plugins $FLUENTD_OPT

eventmachine and em-http-request are dependencies for the fluent-plugin-rollbar plugin. So you will need to install them in order to use fluent-plugin-rollbar.

The fluent/fluentd:v0.14.15-onbuild is copying all the plugins to /fluentd/plugins/. I assume in your installation you have such a plugins folder as well.

Does that help?

akhon commented 7 years ago

thanks. it start trying to post events, looks like we should modify payload for it before

olafnorge commented 7 years ago

I use it in combination with the rollbar-php integration which creates the payload for me. So I don't know exactly how the payload should look like.

@akhon, may you close the issue if it is solved for you?

akhon commented 7 years ago

@olafnorge thanks, but would be great to have a packed gem then manually putting ruby script?

olafnorge commented 7 years ago

@akhon sounds reasonable. Then I leave the issue open until I found some time to publish it as a gem.

max-lobur commented 7 years ago

@olafnorge simplest way would be https://docs.travis-ci.com/user/deployment/rubygems/ I used this heavily for python pip