amazon-archives / logstash-output-cloudwatchlogs

A logstash plugin that allows to send logs to AWS CloudWatch Logs service.
Other
37 stars 34 forks source link

Does this work in logstash 5.0? #12

Open ZenBug13 opened 7 years ago

hartror commented 6 years ago

Nope :(

Installing logstash-output-cloudwatchlogs
fatal: Not a git repository (or any of the parent directories): .git
Plugin version conflict, aborting
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "logstash-core":
  In snapshot (Gemfile.lock):
    logstash-core (= 5.5.0)

  In Gemfile:
    logstash-output-cloudwatchlogs (= 2.0.0.pre1) java depends on
      logstash-core (< 3.0.0, >= 2.0.0) java

    logstash-core (>= 0) java

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
devfacet commented 6 years ago

https://github.com/knockaway/logstash-output-cloudwatchlogs works. I use it with logstash v5

hartror commented 6 years ago

Couple of issues with @knockaway's version, logging follow up issues here as his repo doesn't have issues enabled (which is fair enough he isn't the maintainer).

First of all:

$ ruby -S gem build logstash-output-cloudwatchlogs.gemspec
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    [""] are not files

Checking the previous commit (eec0cc9d4327b173a4d11ab132baff245bfbf71b) fixes that but then with the latest (v5.5.0) logstash I am getting:

Plugin version conflict, aborting
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "logstash-codec-plain":
  In snapshot (Gemfile.lock):
    logstash-codec-plain (= 3.0.3)

  In Gemfile:
    logstash-output-cloudwatchlogs (= 2.0.0.pre1) java depends on
      logstash-codec-plain (<= 3.0.2, >= 2.0.0) java

    logstash-codec-plain (>= 0) java

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Works with v5.4.0 however.

devfacet commented 6 years ago

I haven't tried it with Logstash v5.5.x yet (it's released last week.)

I've made a small change ( https://github.com/knockaway/logstash-output-cloudwatchlogs/commit/6ca50424fc7016f08b0f3b7c404e6fe25e44436c ) Can you try it again with v5.5.x

hartror commented 6 years ago

This line will case the gem build command to fail:

https://github.com/knockaway/logstash-output-cloudwatchlogs/blob/master/logstash-output-cloudwatchlogs.gemspec#L14

devfacet commented 6 years ago

well, I build it in a container and that line doesn't work for my case. (That's why I didn't make a PR to this repo.) This is how I install it;

  1. Download https://github.com/knockaway/logstash-output-cloudwatchlogs/archive/master.zip and extract to /usr/share/logstash/vendor/local_gems/logstash-output-cloudwatchlogs/
  2. Run echo 'gem "logstash-output-cloudwatchlogs", :path => "/usr/share/logstash/vendor/local_gems/logstash-output-cloudwatchlogs/"' >> /usr/share/logstash/Gemfile
  3. Go to cd /usr/share/logstash/vendor/local_gems/logstash-output-cloudwatchlogs/ and run logstash-plugin install --no-verify

I can probably try it next week and post here whether it works with Logstash v5.5.x or not.

P.S.: You can fork it and redo https://github.com/knockaway/logstash-output-cloudwatchlogs/blob/master/logstash-output-cloudwatchlogs.gemspec#L14 if my case doesn't work for you.

hartror commented 6 years ago

Obviously my preference would be for this repo to be updated. I'd be happy to get a PR going if I knew if a maintainer still existed? Perhaps @hyandell or @wanghq could let us know?

wanghq commented 6 years ago

@hartror , I am no longer with AWS and it's inappropriate for me to accept PR. But if you can submit a PR, @DVassallo might be able to merge it.

hartror commented 6 years ago

Thanks @wanghq. @DVassallo are you in a position to merge a PR if I roll one?

ervansetiawan commented 6 years ago

I am also waiting for fix for this. I found the fork at https://github.com/LiveSafe/logstash-output-cloudwatchlogs to be working with Logstash 5.x. It would be nice if those changes can be merged to master.