Logpush アラートと分析
Logpush ジョブは、宛先に到達できない、顧客のオリジンでの権限の変更、または Logpush ジョブが過去 24 時間に少なくとも 1 回の成功したプッシュを完了しなかったなど、いくつかの理由で失敗する可能性があります。
分析とアラートを使用すると、Logpush ジョブの健康状態を監視し、ジョブが失敗したときに自分で確認できます。アラートを受け取ることができ、GraphQL を介して Logpush ジョブの健康状態に関する分析を取得することもできます。
アラートは Cloudflare Notifications システムを介して送信されます。メールまたはウェブフックを介して送信できます。ジョブ無効化通知に登録すると、24 時間ごとにジョブごとに最大 1 回のアラートを受け取ります。通知メールにはジョブ ID と宛先設定が含まれています。
Failing Logpush Job Disabled
Who is it for?Enterprise customers who use Logpush and want to monitor their job health.
Other options / filters- Notification Name: A custom name for the notification.
- Description (optional): A custom description for the notification.
- Notification Email (can be multiple emails): The email address of the recipient for the notification.
Enterprise plans.
What should you do if you receive one?In the email for the notification, you can find the destination name for the failing Logpush job. With this destination name, you should be able to figure out which zone this relates to. There can be multiple reasons why a job fails, but it is best to test that the destination endpoint is healthy, and that necessary credentials are still working. You can also check that the destination has allowlisted Cloudflare IPs.
ダッシュボードの Notifications セクションを介して Failing Logpush Job Disabled のアラートを追加できます。アラートはアカウントレベルで構成でき、アカウント内のすべてのジョブに適用されることに注意してください。
- Cloudflare ダッシュボード ↗ にログインし、アカウントとドメインを選択します。
- Notifications に移動します。
- 次に、Add を選択します。
- アラート Failing Logpush Job Disabled を選択します。
- アラートを構成します: 名前を選択し、説明を追加(オプション)、通知サービス、ウェブフックを選択し、通知を受け取りたいメールアドレスを入力します。
- Save を選択します。
これらの手順を完了すると、Logpush ジョブが無効になった場合にメールアラートを受け取ります。
顧客は GraphQL API を介して Logpush ジョブの健康メトリクスをクエリできます。データセットの名前は logpushHealthAdaptiveGroups で、スキーマは GraphQL API を使用して探索できます。
以下は、S3 にプッシュするジョブが失敗した回数を取得するためのクエリです。
query{ viewer { zones(filter: { zoneTag: $zoneTag}) { logpushHealthAdaptiveGroups(filter: { datetime_gt:"2022-08-15T00:00:00Z", destinationType:"s3", status_neq:200 }, limit:10) { count, dimensions { jobId, status, destinationType } } } }}