mirror of
https://github.com/moan0s/alertbot.git
synced 2024-09-29 17:35:36 +00:00
Compare commits
No commits in common. "742ca95d8403770793baec3165f850fa639cdd0e" and "6fadb6d25e8fdb8d33eba2bf03175ce20c892761" have entirely different histories.
742ca95d84
...
6fadb6d25e
@ -1,7 +1,3 @@
|
|||||||
# March 2023
|
|
||||||
|
|
||||||
Change `!url` to display the full webhook url not just the base
|
|
||||||
|
|
||||||
# December 2022
|
# December 2022
|
||||||
|
|
||||||
* Handle sending an alert to a room where the bot is not allowed to send messages [#2](https://github.com/moan0s/alertbot/issues/2)
|
* Handle sending an alert to a room where the bot is not allowed to send messages [#2](https://github.com/moan0s/alertbot/issues/2)
|
||||||
|
12
README.md
12
README.md
@ -8,16 +8,8 @@ join the [Alertbot room on matrix](https://matrix.to/#/#alertbot:hyteck.de)
|
|||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
## OPTION 1: Use provided alertbot
|
|
||||||
|
|
||||||
* Create a Matrix room and invite @alertbot:hyteck.de
|
|
||||||
* Send `!url` to the room. The bot will answer with the webhook URL
|
|
||||||
* Put the Webhook URL into your monitoring solution (see below)
|
|
||||||
|
|
||||||
## OPTION 2: Selfhost alertbot
|
|
||||||
|
|
||||||
**Prerequisites:**
|
**Prerequisites:**
|
||||||
* A Matrix server where you have access to a maubot instance: Please [refer to the docs](https://docs.mau.fi/maubot/usage/setup/index.html) for setting up one
|
* A maubot instance: Please [refer to the docs](https://docs.mau.fi/maubot/usage/setup/index.html) for setting up one
|
||||||
* An instance of alertmanager or grafana or a similar alerting program that is able to send webhooks
|
* An instance of alertmanager or grafana or a similar alerting program that is able to send webhooks
|
||||||
|
|
||||||
**Getting the code**
|
**Getting the code**
|
||||||
@ -92,7 +84,7 @@ curl --header "Content-Type: application/json" \
|
|||||||
|
|
||||||
# Local testing Setup
|
# Local testing Setup
|
||||||
|
|
||||||
You might want to test the bot on your local machine but send webhooks to a public server. To do that use a domain
|
Also you might want to test the bot on your local machine but send webhooks to a public server. To do that use a domain
|
||||||
e.g. webbhook.example.com and configure nginx as reverse proxy for port 4242 for this domain.
|
e.g. webbhook.example.com and configure nginx as reverse proxy for port 4242 for this domain.
|
||||||
|
|
||||||
## Connect
|
## Connect
|
||||||
|
@ -208,7 +208,7 @@ class AlertBot(Plugin):
|
|||||||
@command.new()
|
@command.new()
|
||||||
async def url(self, evt: MessageEvent) -> None:
|
async def url(self, evt: MessageEvent) -> None:
|
||||||
"""Answers with the url of the webhook"""
|
"""Answers with the url of the webhook"""
|
||||||
await evt.reply(f"`{self.webapp_url}/webhook/{evt.room_id}`")
|
await evt.reply(f"`{self.webapp_url}/webhook`")
|
||||||
|
|
||||||
@command.new()
|
@command.new()
|
||||||
async def raw(self, evt: MessageEvent) -> None:
|
async def raw(self, evt: MessageEvent) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user