Documentation

Notifier plugin

The Notifier Plugin provides multi-channel notification capabilities for InfluxDB 3, enabling real-time alert delivery through various communication channels. Send notifications via Slack, Discord, HTTP webhooks, SMS, or WhatsApp based on incoming HTTP requests. Acts as a centralized notification dispatcher that receives data from other plugins or external systems and routes notifications to the appropriate channels.

Configuration

Request body parameters

ParameterTypeDefaultDescription
notification_textstringrequiredText content of the notification message
senders_configobjectrequiredConfiguration for each notification channel

Sender-specific configuration

The senders_config parameter accepts channel configurations where keys are sender names and values contain channel-specific settings:

Slack notifications

ParameterTypeDefaultDescription
slack_webhook_urlstringrequiredSlack webhook URL
slack_headersstringnoneBase64-encoded JSON headers

Discord notifications

ParameterTypeDefaultDescription
discord_webhook_urlstringrequiredDiscord webhook URL
discord_headersstringnoneBase64-encoded JSON headers

HTTP webhook notifications

ParameterTypeDefaultDescription
http_webhook_urlstringrequiredCustom webhook URL for HTTP POST
http_headersstringnoneBase64-encoded JSON headers

SMS notifications (via Twilio)

ParameterTypeDefaultDescription
twilio_sidstringrequiredTwilio Account SID (or use TWILIO_SID env var)
twilio_tokenstringrequiredTwilio Auth Token (or use TWILIO_TOKEN env var)
twilio_from_numberstringrequiredSender phone number in E.164 format
twilio_to_numberstringrequiredRecipient phone number in E.164 format

WhatsApp notifications (via Twilio)

ParameterTypeDefaultDescription
twilio_sidstringrequiredTwilio Account SID (or use TWILIO_SID env var)
twilio_tokenstringrequiredTwilio Auth Token (or use TWILIO_TOKEN env var)
twilio_from_numberstringrequiredSender WhatsApp number in E.164 format
twilio_to_numberstringrequiredRecipient WhatsApp number in E.164 format

Installation

  1. Start InfluxDB 3 Enterprise with the Processing Engine enabled (--plugin-dir /path/to/plugins)

  2. Install required Python packages:

    • httpx (for HTTP requests)
    • twilio (for SMS and WhatsApp notifications)
    influxdb3 install package httpx
    influxdb3 install package twilio

Create trigger

Create an HTTP trigger to handle notification requests:

influxdb3 create trigger \
  --database mydb \
  --plugin-filename notifier_plugin.py \
  --trigger-spec "request:notify" \
  notification_trigger

This registers an HTTP endpoint at /api/v3/engine/notify.

Enable trigger

influxdb3 enable trigger --database mydb notification_trigger

Examples

Slack notification

Send a notification to Slack:

curl -X POST http://localhost:8181/api/v3/engine/notify \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "notification_text": "Database alert: High CPU usage detected",
    "senders_config": {
      "slack": {
        "slack_webhook_url": "https://hooks.slack.com/services/..."
      }
    }
  }'

SMS notification

Send an SMS via Twilio:

curl -X POST http://localhost:8181/api/v3/engine/notify \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "notification_text": "Critical alert: System down",
    "senders_config": {
      "sms": {
        "twilio_from_number": "+1234567890",
        "twilio_to_number": "+0987654321"
      }
    }
  }'

Multi-channel notification

Send notifications via multiple channels simultaneously:

curl -X POST http://localhost:8181/api/v3/engine/notify \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "notification_text": "Performance warning: Memory usage above threshold",
    "senders_config": {
      "slack": {
        "slack_webhook_url": "https://hooks.slack.com/services/..."
      },
      "discord": {
        "discord_webhook_url": "https://discord.com/api/webhooks/..."
      },
      "whatsapp": {
        "twilio_from_number": "+1234567890",
        "twilio_to_number": "+0987654321"
      }
    }
  }'

Features

  • Multi-channel delivery: Support for Slack, Discord, HTTP webhooks, SMS, and WhatsApp
  • Retry logic: Automatic retry with exponential backoff for failed notifications
  • Environment variables: Credential management via environment variables
  • Asynchronous processing: Non-blocking HTTP notifications for better performance
  • Flexible configuration: Channel-specific settings and optional headers support

Troubleshooting

Common issues

Notification not delivered

  • Verify webhook URLs are correct and accessible
  • Check Twilio credentials and phone number formats
  • Review logs for specific error messages

Authentication errors

  • Ensure Twilio credentials are set via environment variables or request parameters
  • Verify webhook URLs have proper authentication if required

Rate limiting

  • Plugin includes built-in retry logic with exponential backoff
  • Consider implementing client-side rate limiting for high-frequency notifications

Environment variables

For security, set Twilio credentials as environment variables:

export TWILIO_SID=your_account_sid
export TWILIO_TOKEN=your_auth_token

Viewing logs

Check processing logs in the InfluxDB system tables:

influxdb3 query --database _internal "SELECT * FROM system.processing_engine_logs WHERE message LIKE '%notifier%' ORDER BY time DESC LIMIT 10"

Report an issue

For plugin issues, see the Plugins repository issues page.

Find support for InfluxDB 3 Enterprise

The InfluxDB Discord server is the best place to find support for InfluxDB 3 Enterprise. For other InfluxDB versions, see the Support and feedback options.


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

New in InfluxDB 3.4

Key enhancements in InfluxDB 3.4 and the InfluxDB 3 Explorer 1.2.

See the Blog Post

InfluxDB 3.4 is now available for both Core and Enterprise, which introduces offline token generation for use in automated deployments and configurable license type selection that lets you bypass the interactive license prompt. InfluxDB 3 Explorer 1.2 is also available, which includes InfluxDB cache management and other new features.

For more information, check out: