-
Notifications
You must be signed in to change notification settings - Fork 400
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
DOCS: Shoutrrr added list of notification services #3242
Open
cafferata
wants to merge
8
commits into
StackExchange:main
Choose a base branch
from
cafferata:docs/notification-shoutrrr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a7970f9
DOCS: [Notifications]: Improved the JSON code example for code syntax…
cafferata 2dec0b3
DOCS: [Notifications]: Rewrote the introduction to ditch the 'really …
cafferata ccef823
DOCS: [Notifications]: Removed the 'Future work' section now that Sho…
cafferata 1c9fedd
DOCS: [Notifications]: Added the full list of notification services.
cafferata 47f286e
DOCS: [Notifications]: Added Shoutrrr JSON configuration example.
cafferata 25fde92
DOCS: [Notifications]: Renamed 'notification types' to 'notification …
cafferata 9a6d32a
DOCS: [Notifications]: Moved Shoutrrr at the top as preferred notific…
cafferata 525e451
DOCS: [Notifications]: Removed the notification services from this he…
cafferata File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,27 +1,22 @@ | ||||||
# Notifications | ||||||
|
||||||
DNSControl has build in support for notifications when changes are made. This allows you to post messages in team chat, or send emails when dns changes are made. | ||||||
|
||||||
Notifications are written in the [notifications package](https://github.com/StackExchange/dnscontrol/tree/main/pkg/notifications), and is a really simple interface to implement if you want to add | ||||||
new types or destinations. | ||||||
DNSControl includes built-in support for notifications, enabling you to post messages in team chats or send emails whenever DNS changes occur, with the functionality implemented in the [notifications package](https://github.com/StackExchange/dnscontrol/tree/main/pkg/notifications). | ||||||
|
||||||
## Configuration | ||||||
|
||||||
Notifications are set up in your credentials JSON file. They will use the `notifications` key to look for keys or configuration needed for various notification types. | ||||||
Notifications are set up in your credentials JSON file. They will use the `notifications` key to look for keys or configuration needed for various notification services. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
{% code title="creds.json" %} | ||||||
```json | ||||||
"r53": { | ||||||
... | ||||||
}, | ||||||
"gcloud": { | ||||||
... | ||||||
} , | ||||||
{ | ||||||
"r53": {}, | ||||||
"gcloud": {}, | ||||||
"notifications": { | ||||||
"slack_url": "https://api.slack.com/apps/0XXX0X0XX0/incoming-webhooks", | ||||||
"teams_url": "https://outlook.office.com/webhook/00000000-0000-0000-0000-000000000000@00000000-0000-0000-0000-000000000000/IncomingWebhook/00000000000000000000000000000000/00000000-0000-0000-0000-000000000000", | ||||||
"shoutrrr_url": "discover://token@id" | ||||||
"slack_url": "https://api.slack.com/apps/0XXX0X0XX0/incoming-webhooks", | ||||||
"teams_url": "https://outlook.office.com/webhook/00000000-0000-0000-0000-000000000000@00000000-0000-0000-0000-000000000000/IncomingWebhook/00000000000000000000000000000000/00000000-0000-0000-0000-000000000000", | ||||||
"shoutrrr_url": "discover://token@id" | ||||||
} | ||||||
} | ||||||
``` | ||||||
{% endcode %} | ||||||
|
||||||
|
@@ -67,7 +62,44 @@ dnscontrol push --notify | |||||
Successfully ran correction for **example.com[my_provider]** - CREATE foo.example.com A 1.2.3.4 ttl=86400 | ||||||
``` | ||||||
|
||||||
## Notification types | ||||||
## Notification services | ||||||
|
||||||
### Shoutrrr | ||||||
|
||||||
DNSControl supports various notification methods via Shoutrrr, including email (SMTP), Discord, Pushover, and many others. For detailed setup instructions, click on the desired service: | ||||||
|
||||||
* [Bark](https://containrrr.dev/shoutrrr/latest/services/bark/) | ||||||
* [Discord](https://containrrr.dev/shoutrrr/latest/services/discord/) | ||||||
* [Email](https://containrrr.dev/shoutrrr/latest/services/email/) | ||||||
* [Google Chat](https://containrrr.dev/shoutrrr/latest/services/googlechat/) | ||||||
* [Gotify](https://containrrr.dev/shoutrrr/latest/services/gotify/) | ||||||
* [IFTTT](https://containrrr.dev/shoutrrr/latest/services/ifttt/) | ||||||
* [Join](https://containrrr.dev/shoutrrr/latest/services/join/) | ||||||
* [Matrix](https://containrrr.dev/shoutrrr/latest/services/matrix/) | ||||||
* [Mattermost](https://containrrr.dev/shoutrrr/latest/services/mattermost/) | ||||||
* [Ntfy](https://containrrr.dev/shoutrrr/latest/services/ntfy/) | ||||||
* [OpsGenie](https://containrrr.dev/shoutrrr/latest/services/opsgenie/) | ||||||
* [Pushbullet](https://containrrr.dev/shoutrrr/latest/services/pushbullet/) | ||||||
* [Pushover](https://containrrr.dev/shoutrrr/latest/services/pushover/) | ||||||
* [Rocketchat](https://containrrr.dev/shoutrrr/latest/services/rocketchat/) | ||||||
* [Slack](https://containrrr.dev/shoutrrr/latest/services/slack/) | ||||||
* [Teams](https://containrrr.dev/shoutrrr/latest/services/teams/) | ||||||
* [Telegram](https://containrrr.dev/shoutrrr/latest/services/telegram/) | ||||||
* [Zulip Chat](https://containrrr.dev/shoutrrr/latest/services/zulip/) | ||||||
|
||||||
For a full overview of supported methods and configuration details, refer to the [Shoutrrr documentation](https://containrrr.dev/shoutrrr/latest/services/overview/). | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
Configure `shoutrrr_url` with the Shoutrrr URL to be notified. | ||||||
|
||||||
{% code title="creds.json" %} | ||||||
```json | ||||||
{ | ||||||
"notifications": { | ||||||
"shoutrrr_url": "discover://token@id" | ||||||
} | ||||||
} | ||||||
``` | ||||||
{% endcode %} | ||||||
|
||||||
### Slack/Mattermost | ||||||
|
||||||
|
@@ -94,19 +126,3 @@ Configure `telegram_bot_token` and `telegram_chat_id` to these values. | |||||
This is Stack Overflow's built in chat system. This is probably not useful for most people. | ||||||
|
||||||
Configure `bonfire_url` to be the full url including room and api key. | ||||||
|
||||||
### Shoutrrr (email, Discord, Pushover, etc.) | ||||||
|
||||||
DNSControl can use many other notification methods via Shoutrrr, such as email (SMTP), Discord, Pushover and others. See the [Shoutrrr documentation](https://containrrr.dev/shoutrrr/latest/services/overview/) for a list of supported methods and configuration instructions. | ||||||
|
||||||
Configure `shoutrrr_url` with the Shoutrrr URL to be notified. | ||||||
|
||||||
## Future work | ||||||
|
||||||
Yes, this seems pretty limited right now in what it can do. We didn't want to add a bunch of notification types if nobody was going to use them. The good news is, it should | ||||||
be really simple to add more. We gladly welcome any PRs with new notification destinations. Some easy possibilities: | ||||||
|
||||||
- Generic Webhooks | ||||||
|
||||||
Please update this documentation if you add anything. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.