Skip to content

rConfig - Slack Notifications

2 mins V7 Pro

Overview

From V7.3.4, you can receive notifications from rConfig to your Slack channel. This is a great way to keep your team informed of important events and changes in your network.

The support notifications are listed below;

Notification TypeDescriptionVersion
Configuration ChangesNotifies you when a configuration change is made.7.3.4

We will add more notifications in the future, so please check back for updates.

Pre-requisites

  • You must have a Slack account and a channel to send notifications to.
  • You will need some knowledge of how to create a Slack app and get the webhook URL.
  • The Slack app must be installed in the channel you want to send notifications to.
  • The Slack app must have scopes chat:write, chat:write.public and chat:write.customize to send messages to the channel.

Installation

1. Create a Slack App

  1. Go to the Slack API page and click on “Create New App”.
  2. Select “From scratch” and give your app a name and select the workspace you want to install it in.
  3. Click on “Create App”.
  4. Once the app is created, go to the “OAuth & Permissions” page.
  5. Scroll down to the “Scopes” section and add the following scopes:
    • chat:write
    • chat:write.public
    • chat:write.customize
  6. Scroll up to the “OAuth Tokens for Your Workspace” section and click on “Install App to Workspace”.
  7. Authorize the app to access your workspace.
  8. Once the app is installed, you will see a “Bot User OAuth Token” in the “OAuth Tokens for Your Workspace” section. Copy this token, as you will need it later.
  9. Go to the “Basic Information” page and scroll down to the “App Credentials” section.
  10. Copy the “Signing Secret” as you will need it later.

2. Configure rConfig

  1. Open the .env file in your rConfig installation directory.
  2. Add the following lines to the file, replacing YOUR_SLACK_WEBHOOK_URL with the webhook URL you copied earlier:
Terminal window
# Slack Webhook URL
SLACK_ENABLED=true
SLACK_BOT_USER_OAUTH_TOKEN=YourSecureToken
SLACK_BOT_USER_DEFAULT_CHANNEL=YourChannelName

Clear the cache and restart the server:

Terminal window
php artisan rconfig:clear-all

Summary

You have successfully configured rConfig to send notifications to your Slack channel. You can now receive notifications for configuration changes and other events in your network. This is a great way to keep your team informed and up-to-date with the latest changes in your network.

Troubleshooting

If you are having issues with the Slack notifications, here are some troubleshooting steps you can take:

  • Check the rConfig logs for any errors related to Slack notifications. The logs are located in the storage/logs directory of your rConfig installation.
  • Check the Slack app settings to ensure that the app is installed in the correct channel and has the correct scopes.
  • Check the Slack webhook URL to ensure that it is correct and has not changed.
  • Check the Slack channel to ensure that the app is installed and has permission to send messages to the channel.
  • Check the Slack app settings to ensure that the app is installed in the correct channel and has the correct scopes.
  • Check the Slack webhook URL to ensure that it is correct and has not changed.