New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Azure Front Door origin response latency and backend health probe statuses via Azure Monitor, dispatching diagnostic alerts to SRE teams on Slack.
Global enterprise applications rely on Azure Front Door as a cloud-scale Content Delivery Network (CDN) and Layer 7 reverse proxy. Azure Front Door routes incoming client requests across global POPs to backend origins such as App Services, Kubernetes clusters, and regional application gateways. When backend origins suffer from CPU exhaustion, database deadlocks, or misconfigured health probe endpoints, origin response latency spikes and health percentages plunge. If undetected, edge caching fails to mask origin latency and end-user request timeouts increase. This sentinel interrogates Azure Monitor metrics across configured Front Door profiles on a scheduled cadence, measures origin latency percentiles and health probe scores, and alerts SRE teams on Slack before end-user service levels deteriorate.
*/15 * * * *) or triggers on-demand via manual execution.OriginLatency and OriginHealthPercentage over a 15-minute rolling window.max_origin_latency_ms and checks for health probe drops.io.kestra.plugin.core.flow.If task evaluates whether origin latency or health breaches require intervention.#azure-alerts detailing profile names, resource groups, observed latency in milliseconds, and CLI diagnostic commands.flowchart TD
A[scheduled_frontdoor_audit Schedule Trigger] --> B[scan_frontdoor_origin_telemetry Python Script]
B --> C[check_origin_latency Flowable If]
C -- Origin Degraded --> D[notify_slack_origin_latency Webhook]
C -- Origin Healthy --> E[log_frontdoor_status Log]
D --> E
E --> F[export_frontdoor_manifest Return]
| Name | Type | Default | Description |
|---|---|---|---|
azure_subscription_id |
STRING |
00000000-0000-0000-0000-000000000000 |
Target Azure subscription ID hosting the Azure Front Door profile. |
resource_group_name |
STRING |
production-rg |
Name of the Azure resource group containing the Front Door profile. |
frontdoor_profile_name |
STRING |
prod-global-frontdoor |
Name of the Azure Front Door Standard/Premium profile to audit. |
max_origin_latency_ms |
INT |
1200 |
Maximum allowable origin response latency in milliseconds before triggering performance alerts. |
alert_on_latency |
BOOL |
true |
Whether to dispatch automated Slack incident notifications when origin degradation is detected. |
{{ outputs.scan_frontdoor_origin_telemetry.vars.origins_audited_count }}: Number of Front Door profiles evaluated during the audit.{{ outputs.scan_frontdoor_origin_telemetry.vars.degraded_origins_count }}: Number of profiles exhibiting origin latency or health degradations.{{ outputs.scan_frontdoor_origin_telemetry.vars.degraded_origins_details }}: Serialized JSON array of degraded origins with latency metrics.{{ outputs.export_frontdoor_manifest.value }}: Structured dictionary containing the consolidated Front Door performance report.Monitoring Reader role on the Front Door resource group.AZURE_CLIENT_ID: Azure Service Principal Application (Client) ID.AZURE_CLIENT_SECRET: Azure Service Principal client secret credential.AZURE_TENANT_ID: Azure Directory (Tenant) ID.SLACK_WEBHOOK_URL: Slack Incoming Webhook URL used to dispatch incident notifications.AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, and SLACK_WEBHOOK_URL in your Kestra Secret storage.company.cloud namespace.azure_subscription_id, resource_group_name, and frontdoor_profile_name to match your environment.Reader and Monitoring Reader roles on the specific Front Door resource or its resource group.az afd origin update --enabled-state Disabled.