Overview
Notification templates define how and where AWX sends alerts. Each template:- Specifies a notification type (Slack, email, webhook, etc.)
- Contains configuration details (credentials, recipients, endpoints)
- Can have custom message templates for different events
- Can be attached to various AWX objects at different trigger points
Supported Notification Types
AWX supports the following notification services:- Email - SMTP email notifications
- Slack - Slack channel messages
- Webhook - Custom HTTP/HTTPS endpoints
- PagerDuty - Incident management alerts
- Mattermost - Self-hosted team messaging
- Rocket.Chat - Open source team communication
- IRC - Internet Relay Chat messages
- Grafana - Grafana annotations
- Twilio - SMS text messages
- AWS SNS - Amazon Simple Notification Service
Notification Workflow
- Create Notification Template - Define the notification channel and configuration
- Attach to Resources - Associate with job templates, projects, organizations, etc.
- Set Triggers - Choose when to send (start, success, error, approval)
- Customize Messages - Optionally override default message templates
- Test - Verify configuration before production use
Email Notifications
Configuration
Create an email notification template:SMTP Settings
Common SMTP Configurations:Email Message Format
Email notifications include:- Subject: Job name and status
- Body: Detailed job information including:
- Job ID and URL
- Execution time
- Inventory and credentials used
- Play recap and host status
- Error details (for failures)
Slack Notifications
Setup
-
Create Slack Bot:
- Go to https://api.slack.com/apps
- Create New App โ From Scratch
- Add Bot Token Scopes:
chat:write,chat:write.public - Install App to Workspace
- Copy Bot User OAuth Token
- Configure in AWX:
Slack Features
Channel Targeting:- Green for success
- Red for failure
- Yellow for started/running
Slack Message Format
Slack notifications are concise:Webhook Notifications
Configuration
Webhook Payload
AWX sends detailed JSON payload:HTTP Methods
Supported methods:- POST - Most common, sends data in request body
- PUT - Alternative for RESTful APIs
Authentication Methods
Bearer Token (Headers):Webhook Examples
Microsoft Teams:PagerDuty Notifications
Setup
-
Create PagerDuty Service:
- Configuration โ Services โ New Service
- Integration Type: โEvents API V2โ
- Copy Integration Key
-
Get API Token:
- Configuration โ API Access โ Create API Key
- Copy token (starts with โu+โ or โy+โ)
- Configure in AWX:
PagerDuty Incidents
Notifications create incidents with:- Description: Job name and status
- Details: Full job metadata
- Client: Identified by
client_name - Severity: Based on job outcome
Mattermost Notifications
Setup
-
Enable Incoming Webhooks:
- System Console โ Integrations โ Custom Integrations
- Enable Incoming Webhooks
- Optionally enable username/icon overrides
-
Create Webhook:
- Main Menu โ Integrations โ Incoming Webhook
- Add Incoming Webhook
- Select channel and copy URL
- Configure in AWX:
Rocket.Chat Notifications
Setup
-
Create Integration:
- Administration โ Integrations โ New Integration
- Type: Incoming WebHook
- Enable: Yes
- Copy Webhook URL
- Configure in AWX:
IRC Notifications
Configuration
IRC Behavior
- Bot connects, delivers messages, then disconnects
- Supports both channels (
#channel) and direct messages - SSL/TLS supported
- No Nickserv identification (use SASL-capable IRC bouncer if needed)
Grafana Notifications
Setup
-
Create API Key:
- Configuration โ API Keys โ Add API Key
- Role: Editor (for creating annotations)
- Copy key
- Configure in AWX:
Grafana Annotations
Notifications create region annotations:- Time Range: Job start to finish
- Text: Job name and status
- Tags: Custom tags for filtering
- Scope: Dashboard, panel, or global
Twilio SMS Notifications
Setup
- Create Twilio Account
- Get Phone Number for sending
- Create Messaging Service in Twilio Console
- Get Credentials from Account Settings
Configuration
SMS Format
SMS notifications are brief:AWS SNS Notifications
Setup
-
Create SNS Topic:
-
Subscribe Endpoints:
- Create IAM User/Role with SNS publish permissions
Configuration
Attaching Notifications
Job Templates
Attach notifications to job templates:Notification Triggers
Available trigger points:notification_templates_started- Job startsnotification_templates_success- Job succeedsnotification_templates_error- Job failsnotification_templates_approval- Workflow approval events
Organizations
Attach to organizations for all contained jobs:Projects
Notify on project updates:Inventory Sources
Notify on inventory sync:Custom Message Templates
Jinja2 Templating
Customize notification messages using Jinja2 templates:Available Template Variables
Workflow Approval Messages
Testing Notifications
Test notification configuration before use:- Use sample data
- Send immediately
- Appear in notification history
- Donโt affect job execution
Notification Hierarchy
Notifications inherit from parent objects:- Job Template notifications
- Project notifications (inherited)
- Organization notifications (inherited)
Troubleshooting
Email Issues
SMTP Authentication Fails:- Verify credentials are correct
- Check if app-specific passwords required (Gmail)
- Ensure SMTP server allows AWXโs IP
- Test with telnet/openssl s_client
- Check spam/junk folders
- Verify recipient addresses
- Review mail server logs
- Test with plain SMTP (no TLS) to isolate issue
Slack Issues
Messages Not Appearing:- Verify bot token has
chat:writescope - Ensure bot is member of private channels
- Check channel names include
#prefix - Review Bot OAuth Scopes in Slack App settings
- Bot needs to be added to private channels
- Verify
chat:write.publicscope for public channels - Check workspace-level restrictions
Webhook Issues
Connection Refused:- Verify URL is accessible from AWX
- Check firewall rules
- Test with curl from AWX container
- Verify endpoint is listening
- Add CA certificate to AWX trust store
- Temporarily disable SSL verification for testing
- Check certificate expiration and chain
- Review webhook service logs
- Verify expected payload format
- Check authentication headers
- Test with request inspection tools
Debug Notifications
View Notification History:Best Practices
Message Design
- Keep messages concise and actionable
- Include relevant links to AWX UI
- Use appropriate verbosity per channel (brief for SMS, detailed for email)
- Test message templates with various job outcomes
Channel Selection
- Email: Detailed reports, compliance, archives
- Slack/Mattermost: Team collaboration, quick updates
- PagerDuty: Critical failures requiring immediate response
- Webhooks: Integration with other systems
- SMS: Urgent alerts for on-call personnel
- Grafana: Correlation with metrics and monitoring
Performance
- Donโt over-notify (use appropriate triggers)
- Batch notifications when possible
- Configure timeouts appropriately
- Monitor notification delivery times
Security
- Use encrypted connections (TLS/SSL)
- Rotate webhook URLs and API tokens regularly
- Limit sensitive data in notifications
- Apply RBAC to notification templates
- Review recipient lists regularly
Reliability
- Test all notification templates
- Set up fallback notification channels
- Monitor notification success rates
- Have alternative alerting for notification failures
- Document escalation procedures