Alerting on uptime checks

This page shows you how to monitor an uptime check. You can monitor your uptime check with an alerting policy or by creating charts.

Creating an alerting policy

If you don't have an uptime check, follow the instructions in Creating an uptime check. These steps create an alerting policy for an existing uptime check.

To create an alert policy for an existing uptime check, do the following:

  1. In the Cloud Console, select Monitoring:

    Go to Monitoring

  2. Click Uptime checks.

  3. Locate the uptime check that you want to edit, click More and select Add alert policy.

    You can also create an alert policy from the details view of an uptime check. In this case, click Add alert policy in the Uptime details pane.

  4. The Condition for an alerting policy is displayed. The following screenshot shows the Condition pane for an uptime check named "My Uptime Check" prior to any changes:

    Create alert condition dialog.

    The Condition pane includes the Target and Configuration panes. These are pre-populated for you. Complete the Condition configuration by doing the following:

    1. Enter a title for the Condition.
    2. Click Save.
  5. The Create alerting policy dialog is displayed with one condition added to the policy:

    Create a new Alerting Policy dialog.

    Click Next to advance to the notifications section.

  6. (Optional) To be notified when an alert policy violation occurs, click Notification Channels. In the Add notification channel dialog, select one or more notification channels from the menu and then click OK.

    If a notification channel that you want to add isn't listed, then click Manage notification channels. You are taken to the Notification channels page in a new browser tab. From this page, you can update the configured notification channels. After you have completed your updates, return to the original tab, click Refresh , and then select the notification channels to add to the alerting policy.

  7. Click Next to advance to the documentation section.

  8. Enter a name for the policy.

  9. (Optional) Click Documentation and then add any information that you want included in a notification message.

  10. Click Save.

    After the alerting policy is saved, the Policy details page is displayed.

Creating an uptime-passed chart

You can use the Cloud Monitoring uptime_check/check_passed metric as the basis for a chart that displays the status of an uptime check. For example, assume that you have an uptime check configured to check locations every 1 minute and that you want to view the number of passed checks for each location in a 10-minute window.

To use Metrics Explorer to view the metrics for a monitored resource, follow these steps:

  1. In the Google Cloud Console, go to the Monitoring page.

    Go to Monitoring

  2. In the Monitoring navigation pane, click Metrics Explorer.
  3. Select the Configuration tab, and then enter or select a Resource type and a Metric. Use the following information to complete the fields:
    1. In the Metric field, enter check_passed. After this entry, the metric Check passed is displayed.
    2. If the Resource isn't automatically populated for you, then select the resource type that has the uptime check you want to monitor.
    The fully qualified name for this monitored resource is monitoring.googleapis.com/uptime_check/check_passed.
  4. (Optional) To configure how the data is viewed, use the Filter, Group By and Aggregator menus. For this chart, use the following settings:
    1. Leave the Aggregator field at the default value of none.
    2. For the Period field, select 10 m.
    3. Click Show advanced options and do the following:
      • For the Aligner field, select count true.
    For more information, see Selecting metrics.
Because the uptime check is configured to execute every minute, it is expected that every location would respond approximately 10 times in a 10-minute alignment period.

Creating an uptime-latency chart

You can use the Monitoring uptime_check/request_latency metric as a basis for uptime check latency charts. Your choices for the aggregator fields let you create different charts. You can, for example, set these fields to display the maximum latency or to display the total latency.

To use Metrics Explorer to view the metrics for a monitored resource, follow these steps:

  1. In the Google Cloud Console, go to the Monitoring page.

    Go to Monitoring

  2. In the Monitoring navigation pane, click Metrics Explorer.
  3. Select the Configuration tab, and then enter or select a Resource type and a Metric. Use the following information to complete the fields:
    1. In the Metric field, enter uptime_check/request_latency. After this entry, the metric Request latency is displayed.
    2. If the Resource isn't automatically populated for you, then select the resource type that has the uptime check you want to monitor.
    The fully qualified name for this monitored resource is monitoring.googleapis.com/uptime_check/request_latency.
  4. (Optional) To configure how the data is viewed, use the Filter, Group By and Aggregator menus. For this chart, use the following settings:
    1. Leave the Aggregator field at the default value of none.
    2. For the Period field, select 10 m.
    3. Click Show advanced options and do the following:
      • For the Aligner field, select mean.
    For more information, see Selecting metrics.