Skip to main content
AWX can send notifications about job status, workflow events, and approvals to various communication platforms and services. Notifications help teams stay informed about automation activities without constantly monitoring the AWX interface.

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

  1. Create Notification Template - Define the notification channel and configuration
  2. Attach to Resources - Associate with job templates, projects, organizations, etc.
  3. Set Triggers - Choose when to send (start, success, error, approval)
  4. Customize Messages - Optionally override default message templates
  5. 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

  1. 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
  2. Configure in AWX:

Slack Features

Channel Targeting:
Thread Replies:
Color Coding: Messages automatically use colors based on job status:
  • 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):
Basic Auth (Username/Password):
API Key (Headers):

Webhook Examples

Microsoft Teams:
Discord:
Custom API:

PagerDuty Notifications

Setup

  1. Create PagerDuty Service:
    • Configuration β†’ Services β†’ New Service
    • Integration Type: β€œEvents API V2”
    • Copy Integration Key
  2. Get API Token:
    • Configuration β†’ API Access β†’ Create API Key
    • Copy token (starts with β€œu+” or β€œy+”)
  3. 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

  1. Enable Incoming Webhooks:
    • System Console β†’ Integrations β†’ Custom Integrations
    • Enable Incoming Webhooks
    • Optionally enable username/icon overrides
  2. Create Webhook:
    • Main Menu β†’ Integrations β†’ Incoming Webhook
    • Add Incoming Webhook
    • Select channel and copy URL
  3. Configure in AWX:

Rocket.Chat Notifications

Setup

  1. Create Integration:
    • Administration β†’ Integrations β†’ New Integration
    • Type: Incoming WebHook
    • Enable: Yes
    • Copy Webhook URL
  2. 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

  1. Create API Key:
    • Configuration β†’ API Keys β†’ Add API Key
    • Role: Editor (for creating annotations)
    • Copy key
  2. 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

  1. Create Twilio Account
  2. Get Phone Number for sending
  3. Create Messaging Service in Twilio Console
  4. Get Credentials from Account Settings

Configuration

SMS Format

SMS notifications are brief:

AWS SNS Notifications

Setup

  1. Create SNS Topic:
  2. Subscribe Endpoints:
  3. 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 starts
  • notification_templates_success - Job succeeds
  • notification_templates_error - Job fails
  • notification_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:
Test notifications:
  • Use sample data
  • Send immediately
  • Appear in notification history
  • Don’t affect job execution

Notification Hierarchy

Notifications inherit from parent objects:
A job will trigger notifications from:
  1. Job Template notifications
  2. Project notifications (inherited)
  3. 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
Emails Not Received:
  • 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:write scope
  • Ensure bot is member of private channels
  • Check channel names include # prefix
  • Review Bot OAuth Scopes in Slack App settings
Permission Denied:
  • Bot needs to be added to private channels
  • Verify chat:write.public scope 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
SSL Certificate Error:
  • Add CA certificate to AWX trust store
  • Temporarily disable SSL verification for testing
  • Check certificate expiration and chain
Webhook Returns Error:
  • Review webhook service logs
  • Verify expected payload format
  • Check authentication headers
  • Test with request inspection tools

Debug Notifications

View Notification History:
Check Notification Status:
Review Error Details:

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

API Examples

Create Email Notification

Create Slack Notification

Attach to Job Template

See Also