Bridges

For the full list of available bridges and to get help, join #bridges:mbot.ethz.ch. New bridges and updates will be posted in this room.

Hookshot

The source code for the bridge is available at matrix-hookshot on Github. Currently enabled features:

  • Generic webhooks (inbound, outbound)

For a list of commands see the help:

!hookshot help

Generic webhooks

This section covers inbound webhhoks.

Base URL: https://hookshot.mbot.ethz.ch/webhook/<hook>

  1. Invite hookshot (@hookshot:mbot.ethz.ch) to your unencrypted room
  2. Give the bot permissions (Moderator)
  3. Send the message !hookshot webhook <name> (replace <name>)
  4. The bridge will send you an URL in a private admin room (DM)

The bridge accepts POST or PUT requests. See docs for details or the example below.

Example usage

Example json payloads:

{"text":"Hello world!"}
{"text":"Hello **world**!"}
{"text":"Hello world!","html":"Hello <b>world</b>!"}
{"text":"Hello world!","username":"Jay Doe"}

Example using httpie:

http PUT "<url>" <<<'<payload>'

Example using curl:

curl --header "Content-Type: application/json" --data '<payload>' "<url>"

Remove webhooks

In the room where webhooks were configured (not admin room):

  • List webhooks: !hookshot webhook list
  • Remove webhook: !hookshot webhook remove <name>

Outbound webhhoks

Experimental, deleting outbound hooks is not implemented. Use it wisely!

  1. Create a new unencrypted room
  2. Use similar steps as for inbound webhooks. See !hookshot help for usage and refer to the docs.

Webhook API (Grafana, Slack)

Base URL: https://webhooks.mbot.ethz.ch/webhook/<api>/<hook>

This API translates incoming webhooks into generic webhooks (hookshot). The source code is available on ETH Gitlab or on Github.

  1. Create a generic webhook using hookshot (see above)
  2. Use the <hook> URL part from hookshot with the base URLs listed below

Optional (but recommended): Disable URL Previews (in Room > Settings). Otherwise URL Previews may generate error messages when previewing links sent by the webhook which require authentication.

Grafana webhook notification

Base URL: https://webhooks.mbot.ethz.ch/webhook/grafana/<hook>

In Grafana (Docs):

  1. Create a contact point: Alerting > Contact points > Add contact point
  2. Add a Name and select Integration: Webhook
  3. Paste the url into the URL field

Optional: Select another notification template using a query parameter: ?template=<template>. Refer to the configuration section for details.

Grafana Slack notification (deprecated for Grafana)

Do not use for Grafana alerts. Use Grafana webhook notification instead.

Base URL: https://webhooks.mbot.ethz.ch/webhook/slack/<hook>

  1. Create a contact point: Alerting > Contact points > Add contact point
  2. Select Integration: Slack
  3. Paste the url into the Webhook URL field
  4. Optional: Set Optional Slack settings > Username to Grafana

Heisenbridge

A bouncer-style Matrix IRC bridge. Can be used as an alternative to existing bridges using matrix-appservice-irc which already bridge many IRC networks to Matrix.

The source code is available at hifi/heisenbridge on Github.

  1. Start a DM with heisenbridge (@heisenbridge:mbot.ethz.ch)
  2. Type help or <command> -h to get started

Slack

Talk to rda in #bridges:mbot.ethz.ch if you want to bridge your Slack channels to Matrix.

A fully functioning bridge can be tested in #isg-slack-bridge:phys.ethz.ch.