Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(alerts): add Matrix support to alerts #3507

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

n194
Copy link

@n194 n194 commented Jul 6, 2021

Description

This PR adds an alert for Matrix. Matrix is a decentralized messaging platform that allows to allows other applications to send messages via a webhook.

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue.
  • This pull request uses the develop branch as its base.
  • This pull request Subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have checked that this code is commented where required.
  • I have provided a detailed with enough description of this PR.
  • I have checked If documentation needs updating.

Documentation

TODO: Add a page to user docs
GameServerManagers/LinuxGSM-Docs#75

@n194 n194 marked this pull request as ready for review July 6, 2021 09:20
@dgibbs64
Copy link
Member

dgibbs64 commented Jul 6, 2021

Good idea. will merge as soon as I can. Please bear with me though as I am moving house soon :)

Copy link
Member

@h3o66 h3o66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All default configs need to be updated.
As well a update of the file lgsm/functions/alert.sh is needed

@n194
Copy link
Author

n194 commented Jul 7, 2021

I updated alert.sh. Is there any good way to update all the default configs automatically?

@jamiew0w
Copy link
Contributor

jamiew0w commented Jul 7, 2021

I updated alert.sh. Is there any good way to update all the default configs automatically?

for i in $(find lgsm/config-default/config-lgsm/ -name _default.cfg); do sed -i 's%mailgunemail="email@myemail.com"%&\n\n# Matrix Alerts | https://docs.linuxgsm.com/alerts/matrix\nmatrixalert="off"\nmatrixtoken="accesstoken%g' $i; done

alerts look to be done alphabetically so this will insert it after mailgun, just update the matrixtoken="whatever" to whatever variables you need

@dgibbs64
Copy link
Member

What is the best way for me to test this? I am currently doing an alerts refactor

@n194
Copy link
Author

n194 commented Sep 27, 2021

What is the best way for me to test this? I am currently doing an alerts refactor

The instructions at GameServerManagers/LinuxGSM-Docs#75 should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants