I want to know what I need to place in the square brackets and quotes.
The keywords systems , databases , marketing , development are discordapp.com channels (they should already exist within your discord server).
implies to me that the text in the quotes are channel names, which doesn’t make sense because Discord doesn’t permit spaces in channel names.
Why is the role necessary if the purpose is simply sending notifications to channel?
And how can I input channel ID instead of channel name? In Discord it’s possible to have unlimited duplicated channel names as long as they are in separate categories.
Let me try to clarify our documentation, I did not work with Discord, but I have worked with other Notification methods used with Netdata. Firstly it is necessary to edit the main variables for discord:
1 - Please, go to /etc/netdata and run
$ sudo ./edit-config health_alarm_notify.conf
when your favorite editor opens, set the next variables:
# enable/disable sending discord notifications
SEND_DISCORD="YES"
# Create a webhook by following the official documentation -
# https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks
DISCORD_WEBHOOK_URL="https://discordapp.com/api/webhooks/XXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
# if a role's recipients are not configured, a notification will be send to
# this discord channel (empty = do not send a notification for unconfigured
# roles):
DEFAULT_RECIPIENT_DISCORD="alarms"
According our documentation and some examples we have inside health_alarm_notify the default values for the vector are:
I took a look in the main script used to send data, and I observed that the spaces are used to separate the channels, so if you have spaces, the words will be considered different channels.
The variable declaration role_recipients_discord[sysadmin] means that you have a role named sysadmin that sends data to channel systems.. I think our documentation needs an update here.
Finally you can also test if your configuration is delivering correctly the alarms running the following commands:
$ cd /usr/libexec/netdata/plugins.d/
$ ./alarm-notify test
The notification docs admittedly haven’t gotten as much love as a lot of other areas.
I’ll work with @Thiago_Marques_0 to come up with a new template/paradigm for organizing all of these individual notifications docs (hopefully with more immediate value), and then over time we’ll bring the same format to every notification doc.