mirror of https://github.com/caronc/apprise
Updated Notify_mattermost (markdown)
parent
1cd575d88e
commit
33541ebd10
|
@ -4,40 +4,81 @@
|
||||||
* **Message Format**: Text
|
* **Message Format**: Text
|
||||||
* **Message Limit**: 4000 Characters per message
|
* **Message Limit**: 4000 Characters per message
|
||||||
|
|
||||||
To use this plugin, you need to first set yourself up with http://mattermost.com. Download their software and set it up. The setup is based on Incoming Web Hooks requiring you to generate your own Authentication Token (WebHook ID).
|
To use this plugin, you need to first set yourself up with http://mattermost.com. Download their software and set it up.
|
||||||
|
|
||||||
|
From here you'll need an **Incoming Webhook*. This can be done as follows:
|
||||||
|
1. Click on the **Integrations** option under the channel dropdown and select **Incoming Webhook**:
|
||||||
|

|
||||||
|
2. From here you can select **Add Incoming Webhook**:
|
||||||
|

|
||||||
|
3. Finally you'll be able to customize how you want the webhook to act/behave and you can press **Save** at the bottom when you're complete.
|
||||||
|

|
||||||
|
|
||||||
|
An example URL you may be provided could look like this:
|
||||||
|
```bash
|
||||||
|
# The URL provided by Mattermost:
|
||||||
|
http://localhost:8065/hooks/yokkutpah3r3urc5h6i969yima
|
||||||
|
^ ^ ^
|
||||||
|
| | |
|
||||||
|
hostname port webhook token
|
||||||
|
|
||||||
|
# From here you can do the following to generate your Apprise URL:
|
||||||
|
# - http:// becomes mmost://
|
||||||
|
# - drop /hooks reference
|
||||||
|
# Which gets you:
|
||||||
|
mmost://localhost:8065/yokkutpah3r3urc5h6i969yima
|
||||||
|
```
|
||||||
|
|
||||||
### Syntax
|
### Syntax
|
||||||
Valid syntaxes are as follows:
|
Valid syntaxes are as follows:
|
||||||
* **mmost**://**{hostname}**/**{authtoken}**
|
* `mmost://{hostname}/{token}`
|
||||||
* **mmost**://**{hostname}**:**{port}**/**{authtoken}**
|
* `mmost://{hostname}:{port}/{token}`
|
||||||
* **mmost**://**{botname}**@**{hostname}**/**{authtoken}**
|
* `mmost://{botname}@{hostname}/{token}`
|
||||||
* **mmost**://**{botname}**@**{hostname}**:**{port}**/**{authtoken}**
|
* `mmost://{botname}@{hostname}:{port}/{token}`
|
||||||
* **mmosts**://**{hostname}**/**{authtoken}**
|
* `mmost://{hostname}/{path}/{token}`
|
||||||
* **mmosts**://**{hostname}**:**{port}**/**{authtoken}**
|
* `mmost://{hostname}:{port}/{path}/{token}`
|
||||||
* **mmosts**://**{botname}**@**{hostname}**/**{authtoken}**
|
* `mmost://{botname}@{hostname}/{path}/{token}`
|
||||||
* **mmosts**://**{botname}**@**{hostname}**:**{port}**/**{authtoken}**
|
* `mmost://{botname}@{hostname}:{port}/{{path}/token}`
|
||||||
* **mmosts**://**{hostname}**/**{path}**/**{authtoken}**
|
|
||||||
* **mmosts**://**{hostname}**:**{port}**/**{path}**/**{authtoken}**
|
|
||||||
* **mmosts**://**{botname}**@**{hostname}**/**{path}**/**{authtoken}**
|
|
||||||
* **mmosts**://**{botname}**@**{hostname}**:**{port}**/**{path}**/**{authtoken}**
|
|
||||||
|
|
||||||
Secure connections (via https) should be referenced using **mmosts://** where as insecure connections (via http) should be referenced via **mmost://**.
|
Secure connections (via https) should be referenced using **mmosts://** where as insecure connections (via http) should be referenced via **mmost://**; they follow the same structure:
|
||||||
|
|
||||||
|
* `mmosts://{hostname}/{token}`
|
||||||
|
* `mmosts://{hostname}:{port}/{token}`
|
||||||
|
* `mmosts://{botname}@{hostname}/{token}`
|
||||||
|
* `mmosts://{botname}@{hostname}:{port}/{token}`
|
||||||
|
* `mmosts://{hostname}/{path}/{token}`
|
||||||
|
* `mmosts://{hostname}:{port}/{path}/{token}`
|
||||||
|
* `mmosts://{botname}@{hostname}/{path}/{token}`
|
||||||
|
* `mmosts://{botname}@{hostname}:{port}/{{path}/token}`
|
||||||
|
|
||||||
### Parameter Breakdown
|
### Parameter Breakdown
|
||||||
| Variable | Required | Description
|
| Variable | Required | Description
|
||||||
| ----------- | -------- | -----------
|
| ----------- | -------- | -----------
|
||||||
| hostname | Yes | The server Mattermost is listening on.
|
| hostname | Yes | The server Mattermost is listening on.
|
||||||
| authtoken | Yes | The Authentication Token (the WebHook ID) you would have gotten after setting up the Mattermost server
|
| token | Yes | The Webhook Token you would have received after setting up the Mattermost **Incoming Webhook**
|
||||||
| port | No | The server port Mattermost is listening on. By default the port is **8065**.
|
| port | No | The server port Mattermost is listening on. By default the port is **8065**.
|
||||||
| path | No | You can identify a sub-path if you wish. The last element of the path must be the **authtoken**.
|
| path | No | You can identify a sub-path if you wish. The last element of the path must be the **token**.
|
||||||
| botname | No | An optional botname you can associate with your post
|
| botname | No | An optional botname you can associate with your post
|
||||||
|
| image | No | Identify whether or not you want the Apprise image (showing status color) to display with every message or not. By default this is set to **yes**.
|
||||||
|
| channels | No | You can optionally specify as many channels as you want in a comma separated value (as a keyword argument). See example below for how to use this. You must also not restrict your **Incoming Webhook** to only focus on a specific channel or providing alternatives here will not work.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
Send a secure Mattermost notification to our server
|
Send a secure Mattermost notification to our server
|
||||||
```bash
|
```bash
|
||||||
# Assuming our {hostname} is mattermost.server.local
|
# Assuming our {hostname} is mattermost.server.local
|
||||||
# Assuming our {authtoken} is 3ccdd113474722377935511fc85d3dd4
|
# Assuming our {token} is 3ccdd113474722377935511fc85d3dd4
|
||||||
|
|
||||||
apprise -vv -t "Test Message Title" -b "Test Message Body" \
|
apprise -vv -t "Test Message Title" -b "Test Message Body" \
|
||||||
mmosts://mattermost.server.local/3ccdd113474722377935511fc85d3dd4
|
mmosts://mattermost.server.local/3ccdd113474722377935511fc85d3dd4
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Send an insecure Mattermost notification to server in addition to having to address specific channels:
|
||||||
|
```bash
|
||||||
|
# Assuming our {hostname} is mattermost.server.local
|
||||||
|
# Assuming our {token} is 3ccdd113474722377935511fc85d3dd4
|
||||||
|
# Assuming our {channels} is #support and #general
|
||||||
|
|
||||||
|
# We don't need to provide the '#' (hashtag) prefix:
|
||||||
|
apprise -vv -t "Test Message Title" -b "Test Message Body" \
|
||||||
|
mmost://mattermost.server.local/3ccdd113474722377935511fc85d3dd4?channels=support,general
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue