ChatOps Troubleshooting
Slack Integration
Bot Not Responding to Commands
Symptoms:
- Slash commands return no response
- Bot appears offline or unresponsive
Common Causes and Solutions:
-
Check Bot Token
# Test bot connection ./im connector slack status # Verify token is valid curl -X POST 'https://slack.com/api/auth.test' \ -H 'Authorization: Bearer xoxb-your-token' -
Socket Mode Issues
- If using Socket Mode, ensure the app is connected
- Check: Slack App Settings → Socket Mode → Connections
-
Request URL Not Reachable
- For HTTP mode, verify the endpoint is publicly accessible
- Check: Slack App Settings → Interactivity & Shortcuts
Slash Commands Return “dispatch_failed”
Symptoms:
- Commands show “dispatch_failed” error
- Logs show timeout errors
Solutions:
-
Response Time
- Slack requires acknowledgment within 3 seconds
- Use async response for long-running operations:
// Acknowledge immediately w.WriteHeader(http.StatusOK) // Process and respond via response_url -
Check Request URL
- Must be HTTPS with valid certificate
- Must respond to Slack’s verification challenge
Missing OAuth Scopes
Symptoms:
missing_scopeerrors- Some features work, others don’t
Solutions:
-
Required Scopes
channels:history channels:read chat:write commands im:history im:write users:read -
Reinstall App
- After adding scopes, users must reinstall
- Go to: Slack App Settings → Install App → Reinstall
Notifications Not Delivered
Symptoms:
- Incident updates don’t post to channels
- No errors in logs
Debugging:
-
Check Channel Configuration
./im chatops slack list-channels # Verify target channels are configured -
Bot Membership
- Bot must be invited to private channels
- Use
/invite @incident-botin the channel
-
Channel ID vs Name
- Use channel IDs (C0123ABC) not names (#general)
- Names can change; IDs are stable
Microsoft Teams Integration
Bot Not Responding
Symptoms:
- Messages to bot get no response
- Bot shows as offline
Solutions:
-
Check App Registration
./im connector teams status -
Verify Bot Framework Registration
- Check: Azure Portal → Bot Services → [your bot]
- Ensure messaging endpoint is correct
-
Certificate Issues
- Teams requires valid TLS certificates
- Self-signed certificates won’t work
Adaptive Cards Not Rendering
Symptoms:
- Messages appear as raw JSON
- Cards show “Unable to render”
Solutions:
-
Card Version
- Teams supports Adaptive Cards up to version 1.5
- Check card schema version in templates
-
Unsupported Elements
- Some Adaptive Card elements aren’t supported
- Test cards at: https://adaptivecards.io/designer/
Permission Errors
Symptoms:
403 Forbiddenwhen posting messagesUnauthorizederrors in logs
Solutions:
-
Check App Permissions
- Navigate to: Azure Portal → App Registration → API Permissions
- Required:
ChannelMessage.Send,Chat.ReadWrite
-
Admin Consent
- Some permissions require admin consent
- Contact your Teams administrator
Discord Integration
Bot Offline
Symptoms:
- Bot shows as offline in Discord
- Commands don’t work
Solutions:
-
Check Bot Token
./im connector discord status -
Gateway Connection
- Verify bot has
GUILDSandGUILD_MESSAGESintents - Check: Discord Developer Portal → Bot → Privileged Gateway Intents
- Verify bot has
-
Bot Permissions
- Ensure bot role has necessary permissions in server
- Check: Server Settings → Roles → [bot role]
Slash Commands Not Registered
Symptoms:
- Commands don’t appear in Discord
- “Unknown command” errors
Solutions:
-
Register Commands
./im connector discord sync-commands -
Guild vs Global Commands
- Guild commands appear immediately
- Global commands take up to 1 hour to propagate
-
Bot Scope
- Bot must be invited with
applications.commandsscope - Reinvite if scope was missing initially
- Bot must be invited with
Common Issues (All Platforms)
Real-Time Updates Not Working
Symptoms:
- Incident updates don’t appear in chat
- Manual refresh required
Debugging:
-
Check Event Bus Connection
./im events status # Should show connected and subscribed -
Verify Subscription
./im chatops subscriptions list -
Check WebSocket/SSE
- Some networks block WebSocket connections
- Try falling back to SSE if available
Rate Limiting
Symptoms:
- Messages delayed or dropped
429 Too Many Requestserrors
Solutions:
-
Implement Backoff
- All chat platforms have rate limits
- Platform implements exponential backoff automatically
-
Batch Notifications
./im chatops configure --batch-window 5s -
Priority Queuing
- Critical notifications skip the queue
- Non-critical updates are batched
Message Formatting Issues
Symptoms:
- Rich formatting not displaying
- Markdown rendering incorrectly
Solutions:
-
Platform-Specific Formatting
Platform Format Slack mrkdwn (Slack-flavored markdown) Teams Adaptive Cards or HTML Discord Discord markdown -
Check Template Configuration
./im chatops templates list ./im chatops templates validate
Metrics and Observability
ChatOps Metrics
| Metric | Description |
|---|---|
chatops_messages_sent_total |
Messages sent by platform |
chatops_commands_received_total |
Commands received by type |
chatops_command_latency_seconds |
Command processing time |
chatops_connection_status |
Connection health (1=connected) |
chatops_rate_limit_hits_total |
Rate limit encounters |
# Query metrics
curl -s http://localhost:9090/metrics | grep chatops_Enable Debug Logging
export LOG_LEVEL=debug
export CHATOPS_DEBUG=true
./im serveGetting Help
If issues persist:
- Enable debug logging and collect relevant log sections
- Check the GitHub Issues for similar problems
- Open a new issue with:
- Platform (Slack/Teams/Discord) and version
- Error messages and log excerpts
- Bot configuration (redact tokens!)
- Steps to reproduce