Slack Notifications
Slack Notifications: Real-Time Network Configuration Alerts for rConfig V8
Section titled “Slack Notifications: Real-Time Network Configuration Alerts for rConfig V8”Slack Notifications enable rConfig V8 to send real-time alerts and updates directly to your Slack channels. This integration keeps your team informed of important network events, configuration changes, and system activities without requiring constant monitoring of the rConfig interface.
Supported Notification Types
Section titled “Supported Notification Types”rConfig V8 can send the following notifications to Slack:
Notification Type | Description | Availability |
---|---|---|
Configuration Changes | Alerts when device configurations are modified | rConfig V8+ |
Compliance Violations | Notifications when policy compliance issues are detected | rConfig V8+ |
Backup Failures | Alerts when scheduled configuration backups fail | rConfig V8+ |
Connection Errors | Notifications when device connectivity issues occur | rConfig V8+ |
Prerequisites
Section titled “Prerequisites”Before configuring Slack notifications, ensure you have:
- Active Slack workspace with administrative access
- Ability to create and install Slack apps
- Channel(s) designated for rConfig notifications
- Administrator access to rConfig V8
Create Slack App
Section titled “Create Slack App”Step 1: Create New Slack App
Section titled “Step 1: Create New Slack App”- Navigate to Slack API Apps
- Click Create New App
- Select From scratch
- Enter app name (e.g., “rConfig Notifications”)
- Select your workspace
- Click Create App
Step 2: Configure OAuth Permissions
Section titled “Step 2: Configure OAuth Permissions”- Navigate to OAuth & Permissions in the left sidebar
- Scroll to Scopes section
- Under Bot Token Scopes, add the following scopes:
chat:write
- Post messages to channelschat:write.public
- Post messages to public channels without joiningchat:write.customize
- Customize message appearance and bot name
Step 3: Install App to Workspace
Section titled “Step 3: Install App to Workspace”- Scroll to OAuth Tokens for Your Workspace section
- Click Install to Workspace
- Review and authorize the requested permissions
- After installation, copy the Bot User OAuth Token (starts with
xoxb-
)
Step 4: Get Signing Secret (Optional)
Section titled “Step 4: Get Signing Secret (Optional)”For webhook verification (recommended for security):
- Navigate to Basic Information in the left sidebar
- Scroll to App Credentials section
- Copy the Signing Secret
Configure rConfig V8
Section titled “Configure rConfig V8”Step 1: Edit Environment Configuration
Section titled “Step 1: Edit Environment Configuration”Open the rConfig .env
file:
vim /var/www/html/rconfig8/current/.env
Step 2: Add Slack Configuration
Section titled “Step 2: Add Slack Configuration”Add or update the following lines:
# Slack IntegrationSLACK_ENABLED=trueSLACK_BOT_USER_OAUTH_TOKEN=xoxb-your-bot-token-hereSLACK_BOT_USER_DEFAULT_CHANNEL=general
Configuration Parameters:
SLACK_ENABLED
: Set totrue
to enable Slack notificationsSLACK_BOT_USER_OAUTH_TOKEN
: Bot User OAuth Token from Slack appSLACK_BOT_USER_DEFAULT_CHANNEL
: Default channel name for notifications (without#
)
Step 3: Clear Application Cache
Section titled “Step 3: Clear Application Cache”Save the file and clear the rConfig cache:
php /var/www/html/rconfig8/current/artisan rconfig:clear-all
Configure Notification Preferences
Section titled “Configure Notification Preferences”Step 1: Access Notification Settings
Section titled “Step 1: Access Notification Settings”Navigate to Settings > Integrations > Slack Notifications in the rConfig interface.
Step 2: Enable Notification Types
Section titled “Step 2: Enable Notification Types”Select which events should trigger Slack notifications:
- ✓ Configuration changes detected
- ✓ Compliance policy violations
- ✓ Backup failures
- ✓ Device connection errors
Step 3: Configure Channel Routing (Optional)
Section titled “Step 3: Configure Channel Routing (Optional)”Specify different channels for different notification types:
- Configuration changes →
#network-changes
- Compliance violations →
#security-alerts
- Backup failures →
#operations
- Connection errors →
#network-alerts
Step 4: Test Notification
Section titled “Step 4: Test Notification”Click Send Test Message to verify the integration is working correctly.
Expected test message in Slack:
🔔 rConfig Test NotificationThis is a test message from rConfig V8.Integration is working correctly!
Notification Examples
Section titled “Notification Examples”Configuration Change Notification
Section titled “Configuration Change Notification”📝 Configuration Change Detected
Device: core-router-01.example.comType: Cisco IOSChanged: 2025-10-14 10:23:15 UTCUser: [email protected]
View Details: https://rconfig.example.com/devices/123/configs/456
Compliance Violation Notification
Section titled “Compliance Violation Notification”⚠️ Compliance Policy Violation
Device: access-switch-05.example.comPolicy: Password Complexity RequirementsSeverity: High
View Report: https://rconfig.example.com/compliance/reports/789
Backup Failure Notification
Section titled “Backup Failure Notification”❌ Backup Failed
Device: edge-router-03.example.comScheduled Task: Daily Backup - Core NetworkError: Connection timeout after 60 seconds
View Logs: https://rconfig.example.com/tasks/scheduled/456
Troubleshooting
Section titled “Troubleshooting”Test message not appearing in Slack
Section titled “Test message not appearing in Slack”Check Slack app installation:
- Verify app is installed in workspace
- Confirm bot has required scopes (chat:write, chat:write.public, chat:write.customize)
- Check bot token is valid and not revoked
Verify rConfig configuration:
# Check if Slack is enabledgrep SLACK_ENABLED /var/www/html/rconfig8/current/.env
# Verify token format (should start with xoxb-)grep SLACK_BOT_USER_OAUTH_TOKEN /var/www/html/rconfig8/current/.env
Check rConfig logs:
tail -50 /var/www/html/rconfig8/current/storage/logs/laravel.log | grep -i slack
Messages appear as “App” instead of custom name
Section titled “Messages appear as “App” instead of custom name”Set custom bot name:
- Go to Slack app settings
- Navigate to Features > App Home
- Edit Bot User section
- Set display name (e.g., “rConfig Notifications”)
- Save changes
Channel not found errors
Section titled “Channel not found errors”Verify channel name:
- Use channel name without
#
symbol - Ensure channel exists in workspace
- Confirm bot has access to private channels (if applicable)
For private channels:
- Invite bot to private channel:
/invite @rConfig
- Verify bot appears in channel member list
Invalid authentication errors
Section titled “Invalid authentication errors”Check token validity:
- Verify token has not been revoked in Slack app settings
- Confirm workspace has not changed
- Regenerate token if necessary:
- Go to OAuth & Permissions
- Click Revoke (if token exists)
- Click Reinstall to Workspace
- Copy new token
- Update
.env
file
Notifications not sending for specific events
Section titled “Notifications not sending for specific events”Verify event configuration:
- Check notification settings in rConfig
- Ensure specific notification types are enabled
- Confirm channel routing is correct
Check event triggers:
# Review recent events in logstail -100 /var/www/html/rconfig8/current/storage/logs/laravel.log | grep -i notification
Rate limiting issues
Section titled “Rate limiting issues”Symptoms:
- Some notifications not delivered
- Delayed notifications
- Rate limit errors in logs
Resolution:
- Slack limits: 1 message per second per channel
- Consider batching notifications for high-volume events
- Use different channels for different notification types to distribute load
Security Considerations
Section titled “Security Considerations”Protect bot token: Never commit the bot token to version control or share it publicly. Store it securely in the .env
file.
Use signing secret: Enable webhook signature verification using the signing secret to prevent unauthorized message sending.
Restrict permissions: Grant only the minimum required scopes to the Slack bot.
Monitor token usage: Regularly review Slack app audit logs for suspicious activity.
Channel access control: Use private channels for sensitive notifications and carefully manage channel membership.
Best Practices
Section titled “Best Practices”Organize channels: Create dedicated channels for different notification types (e.g., #network-changes, #compliance-alerts).
Use threading: Configure notifications to use threads for related events to reduce channel clutter.
Set notification schedules: Consider limiting non-critical notifications to business hours.
Test regularly: Periodically send test messages to ensure the integration remains functional.
Document channel purposes: Clearly communicate to team members which channels receive which notification types.
Related Documentation
Section titled “Related Documentation”- Email Notifications - Configure email alerts
- Webhook Integration - Send notifications to custom webhooks
- Scheduled Tasks - Configure automated operations
- Compliance Policies - Understanding compliance notifications