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

Documentation for open source Slack alternative Mattermost #28

Open
LukeFlynn opened this issue Aug 26, 2016 · 3 comments
Open

Documentation for open source Slack alternative Mattermost #28

LukeFlynn opened this issue Aug 26, 2016 · 3 comments

Comments

@LukeFlynn
Copy link

Hello!

My team recently migrated from Slack to Mattermost. Mattermost has support for quite a few Slack webhooks already, this one doesn't seem to work though. Is there anyways support could be implemented.. or a way I could hack this together to work?

{"timestamp":"2016-08-25T22:01:35.778237-0500","level":"info","message":"handler output","handler":{"command":"/opt/sensu/embedded/bin/handler-slack.rb","type":"pipe","severities":["critical","unknown"],"name":"slack"},"output":["/opt/sensu/embedded/lib/ruby/2.3.0/net/http/response.rb:120:in `error!': 500 \"Internal Server Error\" (Net::HTTPFatalError)\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-slack-1.0.0/bin/handler-slack.rb:149:in `verify_response'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-slack-1.0.0/bin/handler-slack.rb:141:in `post_data'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-slack-1.0.0/bin/handler-slack.rb:92:in `handle'\n\tfrom /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.3.0/lib/sensu-handler.rb:57:in `block in <class:Handler>'\n"]}

I understand if this is not possible, being that your primary focus is obviously Slack. If there's nothing you guys can do about, is it possible to make a suggestion for a new plugin that does this?

Thanks.

@rahulsh1
Copy link

I was able to get this working with Mattermost. See #7 for more details on how to configure the slack plugin.

@majormoses majormoses changed the title Support for open source Slack alternative Mattermost Documentation for open source Slack alternative Mattermost Oct 7, 2017
@lcx
Copy link
Contributor

lcx commented Jul 19, 2018

for me it only it worked only after adding the content type to the post request.

req = Net::HTTP::Post.new("#{uri.path}?#{uri.query}", 'Content-Type' => 'application/json')

I should check if this works with slack as well, it might make sense to add it even for the non mattermost users?

@joostfaassen
Copy link

joostfaassen commented Nov 10, 2018

This plugin seems to be correctly sending the content-type since this commit in december 2015:

https://github.com/sensu-plugins/sensu-plugins-slack/blame/master/bin/handler-slack.rb#L152

I can also confirm this plugin works well with Mattermost, here's an example config:

{
  "slack": {
    "webhook_url": "https://mattermost.example.com/hooks/xxxxx-xxxxx-xxxxx-xxxxx",
    "dashboard": "https://uchiwa.example.com/#/client/my-datacenter/",
    "channel": "my-channel-name",
    "bot_name": "sensu",
    "icon_url": "https://raw.githubusercontent.com/sensu/sensu-logo/master/sensu1_flat%20white%20bg_png.png",
    "message_prefix": "@user-x, @user-y "
  }
}

Note that you'll need #71 in order for the notifications based on the message_prefix to work though.

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

No branches or pull requests

6 participants