Notification Channels
Phield supports notifying external systems when a trend breach is detected. A trend breach occurs when the count of a specific PII type for a source exceeds the established moving average by a configurable threshold.
Supported Channels
Slack
Phield can send alerts to a Slack channel using Incoming Webhooks.
Configuration
To enable Slack notifications, set the following environment variable:
| Variable | Description | Example |
|---|---|---|
PHIELD_SLACK_WEBHOOK_URL |
The Incoming Webhook URL provided by Slack. | https://hooks.slack.com/services/T000/B000/XXXX |
Setup
- In your Slack workspace, create an "Incoming Webhook" app or integration.
- Select the channel where you want Phield to post alerts.
- Copy the Webhook URL.
- Provide this URL to Phield via the
PHIELD_SLACK_WEBHOOK_URLenvironment variable.
PagerDuty
Phield can send alerts to PagerDuty using the Events API V2.
Configuration
To enable PagerDuty notifications, set the following environment variable:
| Variable | Description | Example |
|---|---|---|
PHIELD_PAGERDUTY_ROUTING_KEY |
The Integration Key (Routing Key) from PagerDuty. | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
PHIELD_PAGERDUTY_SEVERITY |
The severity of the PagerDuty alert (info, warning, error, critical). | critical |
Setup
- In PagerDuty, go to Services -> Service Directory.
- Select or create a service.
- Go to the Integrations tab and add a new integration.
- Search for "Events API V2" and add it.
- Copy the Integration Key.
- Provide this key to Phield via the
PHIELD_PAGERDUTY_ROUTING_KEYenvironment variable.
Structured Logs
By default, Phield always logs trend breaches to standard output as structured log entries. This is useful for integration with log management systems like ELK, Splunk, or CloudWatch.
Example log entry:
2026/04/23 15:43:00 [TREND BREACH] Source: app-1, PII Type: credit-card, Current: 100, Avg: 50.00, Increase: 100.00%