Mattermost PagerDuty Bot
- The Canonical Sysadmins
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 1 | 27 May 2021 | |
latest/edge | 2 | 05 Sep 2024 |
juju deploy mm-pd-bot
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
Configuration File Set Up
Copy over the bot.cfg example
cp examples/bot.cfg bot.cfg
The configuration looks like this:
[PagerDuty]
account = %(MM_PD_BOT_PD_ACCOUNT)s
api-token = %(MM_PD_BOT_PD_TOKEN)s
private-channel = %(MM_PD_BOT_PD_PRIVATE_CHANNEL)s
public-channel = %(MM_PD_BOT_PD_PUBLIC_CHANNEL)s
# This one is optional but will avoid getting incident for ALL escalation policy under your PagerDuty account
filter-status-on-policy = ^(escalation Policy 1|escalation Policy 2)$
[Prometheus]
max_cache_size = 100
[httpd]
listen-ip = 0.0.0.0
listen-port = 2160
# This parameter will be used to construct the url the webhook should reach through the ingress.
# With the above parameters, the webhook URL should be as follows (note that the trailing "/" is required):
# http://%(MM_PD_BOST_HOSTNAME)s/%(MM_PD_BOT_UUID)s/
# Use `uuidgen` tools to generate a random UUID
magic-uuid = %(MM_PD_BOT_UUID)s
ssl = False
[MattermostBot]
bot_url = %(MM_PD_BOT_URL)s
bot_team = %(MM_PD_BOT_TEAM)s
bot_token = %(MM_PD_BOT_TOKEN)s
ssl_verify = False
plugins = modules
[nickname to email]
jdoe = john.doe@example.com
# List of Mattermost nick and their aliases
[Mattermost Aliases]
# List of PagerDuty service ID and the public channel to write to
# Default to the public-channel in the PagerDuty section
[PagerDuty service to Mattermost Channel]
The key section are the PagerDuty and the MattermostBot ones.
The PagerDuty section need your account and a general access token
The MattermostBot section needs a bot account token