Set up Cloud Monitoring alerts

This page describes how you can create alerts for Vertex AI Search for retail, including examples of creating alerts for user event recording, predictions, and searches.

For information about data quality alerts, see Data quality alerts.

For information about troubleshooting errors and viewing error logs, see Troubleshooting data upload issues.

Introduction

Keeping your catalog up to date and recording user events successfully is important for getting high-quality results. Even if your initial imports and event recording are successful, monitoring error rates is still needed in case of unexpected environmental issues, such as network connectivity failures.

You should set up Cloud Monitoring alerts so you can take action promptly in case any issues arise with user event recording, predictions, and search results. You can also monitor recent data integration error rates in the Google Cloud console at any time.

Set up Cloud Monitoring alerts

Cloud Monitoring can be set up to alert on a large number of triggers. When you set up alerts, Vertex AI Search for retail suggests several to set up. If you're unsure which alerts to set up, start with setting up alerts for prediction errors, search errors, and reductions in user event recording.

Set up an alert for prediction errors

Generally, calling the predict method should rarely return an error. This alert is triggered if the number of errors returned by the predict method causes the error ratio to stay above the given threshold for more than 5 minutes. You can adjust the threshold to suit your environment.

To set up alerts from the Search for Retail console:

  1. Go to the Monitoring page in the Search for Retail console.

    Go to the Monitoring page

  2. Click Recommended Alerts.

    The Recommended Alert Policies panel appears on the right. It displays a list of recommended alerts to set up for your project.

  3. Enable High predict error ratio.

  4. Optionally, adjust the threshold to suit your environment.

    The default predict error ratio is 0.03.

  5. Choose a notification channel through which you'll be notified if the alert is triggered, such as an email address or mobile device.

    To set up a new notification channel, select Notification Channels > Manage Notification Channels. See the Cloud Monitoring documentation for more about creating and editing channels.

  6. Click the Submit button to create your alert.

You can also create a custom alert by using Cloud Monitoring. For more information, see the Cloud Monitoring documentation.

This alert is triggered if the number of errors returned by the search method causes the error ratio to stay above the given threshold for more than 5 minutes. You can adjust the threshold to suit your environment.

To set up alerts from the Search for Retail console:

  1. Go to the Monitoring page in the Search for Retail console.

    Go to the Monitoring page

  2. Click Recommended Alerts.

    The Recommended Alert Policies panel appears on the right. It displays a list of recommended alerts to set up for your project.

  3. Enable High search error ratio.

  4. Optionally, adjust the threshold to suit your environment.

    The default threshold ratio is 0.03.

  5. Choose a notification channel through which you'll be notified if the alert is triggered, such as an email address or mobile device.

    To set up a new notification channel, select Notification Channels > Manage Notification Channels. See the Cloud Monitoring documentation for more about creating and editing channels.

  6. Click the Submit button to create your alert.

You can also create a custom alert by using Cloud Monitoring. For more information, see the Cloud Monitoring documentation.

Set up an alert for user event recording reduction

If you see a drop in user event recording that lasts for a prolonged period of time, there could be issues with your user event recording code. This alert is triggered if you don't record any user events for 10 minutes.

To set up a user event recording reduction alert from the Search for Retail console:

  1. Go to the Monitoring page in the Search for Retail console.

    Go to the Monitoring page

  2. Click Recommended Alerts.

    The Recommended Alert Policies panel appears on the right. It displays a list of recommended alerts to set up for your project.

  3. Enable User events record reduction.

  4. Choose a notification channel through which you'll be notified if the alert is triggered, such as an email address or mobile device.

    To set up a new notification channel, select Notification Channels > Manage Notification Channels. See the Cloud Monitoring documentation for more about creating and editing channels.

  5. Click the Submit button to create your alert.

If you are using a method other than WriteUserEvent, such as ImportUserEvents, you can also create a custom alert by using Cloud Monitoring. For more information, see the Cloud Monitoring documentation.

Set up an alert for unjoined user events

This alert is triggered if the ratio of user events that aren't associated with valid products stays above the given threshold for more than one or twelve hours. You can choose the time window and adjust the threshold.

To set up a user event recording reduction alert from the Search for Retail console:

  1. Go to the Monitoring page in the Search for Retail console.

    Go to the Monitoring page

  2. Click Recommended Alerts.

    The Recommended Alert Policies panel appears on the right. It displays a list of recommended alerts to set up for your project.

  3. Enable Ratio of unjoined user events ratio is above the threshold for last hour or Ratio of unjoined user events increases above threshold for last 12 hours.

  4. Optionally, adjust the threshold to suit your environment.

    The default unjoined events ratio is 0.1. This means that if more than 10% of total events ingested are not joined with a valid product within the specified time window, an alert is triggered.

  5. Choose a notification channel through which you'll be notified if the alert is triggered, such as an email address or mobile device.

    To set up a new notification channel, select Notification Channels > Manage Notification Channels. See the Cloud Monitoring documentation for more about creating and editing channels.

  6. Click the Submit button to create your alert.

What's next