解决 Azure 事件网格问题Troubleshoot Azure Event Grid issues

本文提供的信息有助于解决 Azure 事件网格问题。This article provides information that helps you with troubleshooting Azure Event Grid issues.

诊断日志Diagnostic logs

为事件网格主题或域启用诊断设置,以捕获和查看发布与传送失败日志。Enable diagnostic settings for Event Grid topics or domains to capture and view publish and delivery failure logs. 有关详细信息,请参阅诊断日志For more information, see Diagnostic logs.

指标Metrics

你可以查看有关事件网格主题和订阅的指标,并创建关于它们的警报。You can view metrics for Event Grid topics and subscriptions, and create alerts on them. 有关详细信息,请参阅事件网格指标For more information, see Event Grid metrics.

警报Alerts

创建有关 Azure 事件网格指标和活动日志操作的警报。Create alerts on Azure Event Grid metrics and activity log operations. 有关详细信息,请参阅有关事件网格指标和活动日志的警报For more information, see Alerts on Event Grid metrics and activity logs.

订阅验证问题Subscription validation issues

在创建事件订阅的过程中,你可能会收到一条错误消息,指出所提供的终结点的验证失败。During event subscription creation, you may receive an error message that says the validation of the provided endpoint failed. 若要解决订阅验证问题,请参阅事件网格订阅验证故障排除For troubleshooting subscription validation issues, see Troubleshoot Event Grid subscription validations.

错误代码Error codes

如果你收到错误代码为 400、409 和 403 等等的错误消息,请参阅解决事件网格错误If you receive error messages with error codes like 400, 409, and 403, see Troubleshoot Event Grid errors.

示例Sample

请参阅行计数器示例See the Line Counter sample. 此示例应用展示了如何将存储、事件中心和事件网格客户端与 ASP.NET Core 集成、分布式跟踪和托管服务配合使用。This sample app illustrates using Storage, Event Hubs, and Event Grid clients along with ASP.NET Core integration, distributed tracing, and hosted services. 它允许用户将文件上传到 blob,这会触发包含文件名的事件中心事件。It allows users to upload a file to a blob, which triggers an Event Hubs event containing the file name. 事件中心处理器接收事件,然后,应用下载 blob 并对文件中的行数进行计数。The Event Hubs Processor receives the event, and then the app downloads the blob and counts the number of lines in the file. 应用将显示一个指向某个页面的链接,其中包含行计数。The app displays a link to a page containing the line count. 单击此链接后,将使用事件网格发布包含该文件名称的 CloudEvent。When the link is clicked, a CloudEvent containing the name of the file is published using Event Grid.

后续步骤Next steps

如需更多帮助,请在 Stack Overflow 论坛中发布问题,或开具支持票证If you need more help, post your issue in the Stack Overflow forum or open a support ticket.