Skip to content

Notify_rocketchat

Chris Caron edited this page May 11, 2019 · 11 revisions

Rocket.Chat Notifications

  • Source: https://rocket.chat/
  • Icon Support: No
  • Message Format: Text
  • Message Limit: 32768 Characters per Message

Syntax

Valid syntaxes are as follows:

  • rocket://{user}:{password}@{hostname}/#{channel}
  • rocket://{user}:{password}@{hostname}:{port}/#{channel}
  • rocket://{user}:{password}@{hostname}/{room_id}
  • rocket://{user}:{password}@{hostname}:{port}/{room_id}
  • rockets://{user}:{password}@{hostname}/#{channel}
  • rockets://{user}:{password}@{hostname}:{port}/#{channel}
  • rockets://{user}:{password}@{hostname}/{room_id}
  • rockets://{user}:{password}@{hostname}:{port}/{room_id}

You can also form any combination of the above and perform updates from one url:

  • rocket://{user}:{password}@{hostname}/#{channel_id}/{room_id}

If neither a {room_id} or #{channel} is specified then this notification will fail.

Secure connections (via https) should be referenced using rockets:// where as insecure connections (via http) should be referenced via rocket://.

Parameter Breakdown

Variable Required Description
user Yes The user identifier you've associated with your Rocket.Chat server.
password Yes The password identifier you've associated with your Rocket.Chat server.
hostname Yes The Rocket.Chat server you're sending your notification to.
port No The port the Rocket.Chat server is listening on. By default the port is 80 for rocket:// and 443 for all rockets:// references.
room_id No A room identifier.
channel No Channels must be prefixed with a hash (#) or they will be interpreted as a room_id. Channels must be registered with your Rocket.Chat server to work.

Example

Send a Rocket.Chat notification to the channel #nuxref:

# Assuming our {user} is l2g
# Assuming our {password} is awes0m3!
# Assuming our {hostname} is rocket.server.local
apprise rocket://l2g:awes0m3!@rocket.server.local/#nuxref

Setup

Here is how I set up a quick rocket.chat server to test against. This may or may not be useful to other people.

Docker

Based on this source:

# Docker (assuming a connection to docker.io)
docker pull rocket.chat
docker pull mongo:3.0

docker run --name db -d mongo:3.0 --smallfiles
docker run --name rocketchat -p 80:3000 --env ROOT_URL=http://localhost --link db -d rocket.chat
# Then visit http://server.you.ran.these.commands.on
Clone this wiki locally