Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Error While installing plugin in logstash-7.0.1 #17

Closed
bugcy013 opened this issue May 9, 2019 · 13 comments · Fixed by #22
Closed

Getting Error While installing plugin in logstash-7.0.1 #17

bugcy013 opened this issue May 9, 2019 · 13 comments · Fixed by #22

Comments

@bugcy013
Copy link

bugcy013 commented May 9, 2019

Hi Guys,

Unable to install slack output in logstash-7.0.1 can you please check

console logs for reference.

logstash]$ bin/logstash-plugin install logstash-output-slack
Validating logstash-output-slack
Installing logstash-output-slack
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.6)

  In Gemfile:
    logstash-input-azure_event_hubs java was resolved to 1.1.0, which depends on
      logstash-codec-plain java

    logstash-output-slack java was resolved to 0.1.4, which depends on
      logstash-codec-plain (>= 1.0.0, ~> 2.0.0) java

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

Bundler could not find compatible versions for gem "logstash-core":
  In snapshot (Gemfile.lock):
    logstash-core (= 7.0.1)

  In Gemfile:
    logstash-core java

    logstash-core-plugin-api java was resolved to 2.1.16, which depends on
      logstash-core (= 7.0.1) java

    logstash-input-syslog java was resolved to 3.4.1, which depends on
      logstash-filter-grok java was resolved to 4.0.4, which depends on
        logstash-core (>= 5.6.0) java

    logstash-output-slack java was resolved to 0.1.1, which depends on
      logstash-core (>= 1.4.0, < 2.0.0) java

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

Bundler could not find compatible versions for gem "public_suffix":
  In snapshot (Gemfile.lock):
    public_suffix (= 3.0.3)

  In Gemfile:
    logstash-input-twitter java was resolved to 4.0.0, which depends on
      public_suffix (~> 3) java

    logstash-output-slack java was resolved to 2.1.1, which depends on
      public_suffix (< 1.5.0) java

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

@RogerHall
Copy link

I am not familiar with gem/ruby, but it seems that 'bundle update' is a part of ruby package dependency management. From a little digging, it also looks like logstash has its own version of ruby installed in the same tree. What would be the correct way to bootstrap the ruby/gem/bundle environment so that it will work with the logstash installed versions and allow 'bundle update' to be run? Also, would it be correct to run 'bundle update from the logstash home (/usr/share/logstash for me)?

@odlevakp
Copy link

Any news regarding this issue?
Someone on logstash 7 not having this problem?

When we tested migration to ELK 7, this is the only issue we encountered and it's currently holding back our update.

@visserp
Copy link

visserp commented Aug 26, 2019

Having the same issue when building Logstash 7.3.1 for Docker :(

@pawellrus
Copy link

pawellrus commented Sep 3, 2019

I have this issue too. Is there any fix?

@mpseay
Copy link

mpseay commented Sep 11, 2019

We're facing this problem on logstash 7.3 as well. Any ideas?

@odlevakp
Copy link

For me it worked when I removed public_suffix dependency check for < 1.5.0.

After some initial testing, the messages are sent to slack, although, I wouldn't consider it a fix.

Clone and edit spec file.

git clone https://github.com/logstash-plugins/logstash-output-slack.git

cd logstash-output-slack/

vim logstash-output-slack.gemspec

Update version (not needed) and remove public_suffix dependency.

-  s.version         = '2.1.1'
+  s.version         = '7.0.0'

-  s.add_runtime_dependency "public_suffix", "< 1.5.0"
+  s.add_runtime_dependency "public_suffix"

Build and install as a plugin.

bundle install
gem build logstash-output-slack.gemspec


cd /usr/share/logstash/

bin/logstash-plugin install \
~/logstash-output-slack/logstash-output-slack-7.0.0.gem 

@pawellrus
Copy link

pawellrus commented Sep 17, 2019

I've found an alternative to push messages to mattermost. In my case it's enough.

http
{
http_method => "post"
url => "https://mattermost.*/hooks/********"
format => "message"
message => '{"text":"%{@timestamp} %{[beat][hostname]} %{payload}"}'
}

@sillyhatxu
Copy link

Having the same issue when building Logstash 7.3.1 for Docker :(

Same problem. Have you fixed it?

idrikay pushed a commit to idrikay/logstash-output-slack that referenced this issue Nov 22, 2019
@jeffrey-e
Copy link

Still having this issue with 7.4.2

@jeroenvanroon
Copy link

Also having this issue with 7.4.2

@buzzdeee
Copy link

same issue here with 7.6.1

@pingdynasty
Copy link

same issue with 7.8.0

@caseycs
Copy link

caseycs commented Jul 31, 2020

Another option to send messages to slack using http output and define post json content using mapping:

http {
    http_method => "post"
    url => "${SLACK_WEBHOOK}"
    format => "json"
    mapping => {
        channel => "#channel"
        text => "%{level_name} %{channel}: %{message}"
        blocks => [
            {
                type => "section"
                text => {
                    type => "mrkdwn"
                    text => "*%{level_name}, %{channel}*: %{message}"
                }
            }
        ]
        attachments => [
            {
                title => "Kibana"
                title_link => "https://kibana/something"
                color => "#ddd"
            }
        ]
    }
}```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.