Alerting on uptime checks

Using the Google Cloud Console

This page shows you how to monitor an uptime check:

To create, update, and delete your uptime checks, see Managing uptime checks. For details about alerting policies, see Introduction to alerting. To view pricing and limits on uptime checks, see Pricing and limits.

Creating an alerting policy

If you don't have an existing uptime check, you must create one prior to creating an alerting policy. For more information, see Creating uptime checks.

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. Click the Uptime Check tab if it isn't selected.
    2. Enter a title for the Condition.

    3. Click Save.

  5. The Create New Alerting Policy dialog is displayed:

    Create new Alerting Policy

    • Enter a name for the policy.
    • To be notified when an alert policy violation occurs, click Add Notification Channel. In the Add notification channel dialog, select your preferred notification channel, enter any channel-specific information, and click Add.
    • (Optional) Enter a message in the Documentation pane that is to be be included in the notification.
  6. Click Save.

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

Editing an alerting policy

To edit an alerting policy, do the following:

  1. In the Cloud Console, select Monitoring:

    Go to Monitoring

  2. Click Alerting.

  3. Locate the alert policy that you want to edit, then do one of the following:

    • Click More and select Edit.
    • View the alert policy details, and then click Edit.
  4. Change the values of the fields as needed. You can't modify all fields. If the custom header values of a check are hidden, you cannot make them viewable.

  5. Click Save.

Deleting an alerting policy

To delete an alerting policy, do the following:

  1. In the Cloud Console, select Monitoring:

    Go to Monitoring

  2. Click Alerting.

  3. Locate the alert policy that you want to edit, then do one of the following:

    • Click More and select Delete.
    • View the alert policy details, and then click Delete .

Creating an uptime-passed chart

You can use the Stackdriver 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 view the metrics for a monitored resource using Metrics Explorer, do the following:

  1. In the Google Cloud Console, go to Monitoring or use the following button:
    Go to Monitoring
  2. If Metrics Explorer is shown in the navigation pane, click Metrics Explorer. Otherwise, select Resources and then select Metrics Explorer.
  3. Ensure Metric is the selected tab.
  4. Click in the box labeled Find resource type and metric, and then select from the menu or enter the name for the resource and metric. Use the following information to complete the fields for this text box:
    1. Enter check_passed. After this entry, the metric Check passed is displayed.
    2. If the Resource isn't automatically populated for you, 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.
  5. Use the Filter, Group By, and Aggregation menus to modify how the data is displayed. For this uptime latency chart, use the following settings:
    1. Leave the Aggregator field at the defalt value of none.
    2. Click Show advanced options and do the following:
      • For the Aligner field, select count true.
      • For the Alignment Period field, select 10 m.
      • Leave the Alignment Period as none.
    For more information, see Selecting metrics - additional configuration.
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 view the metrics for a monitored resource using Metrics Explorer, do the following:

  1. In the Google Cloud Console, go to Monitoring or use the following button:
    Go to Monitoring
  2. If Metrics Explorer is shown in the navigation pane, click Metrics Explorer. Otherwise, select Resources and then select Metrics Explorer.
  3. Ensure Metric is the selected tab.
  4. Click in the box labeled Find resource type and metric, and then select from the menu or enter the name for the resource and metric. Use the following information to complete the fields for this text box:
    1. Enter uptime_check/request_latency. After this entry, the metric Check passed is displayed.
    2. If the Resource isn't automatically populated for you, 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.
  5. Use the Filter, Group By, and Aggregation menus to modify how the data is displayed. For this uptime chart, use the following settings:
    1. Leave the Aggregator field at the defalt value of none.
    2. Click Show advanced options and do the following:
      • For the Aligner field, select mean.
      • For the Alignment Period field, select 10 m.
      • Leave the Alignment Period as none.
    For more information, see Selecting metrics - additional configuration.

Using the Stackdriver Monitoring console

This page shows you how to create an alerting policy for an uptime check. To create, update, and delete your uptime checks, see the Managing Uptime Checks page. You can have up to 100 uptime checks per Workspace. For details about alerting policies, see Introduction to Alerting.

Be sure to create the alerting policy for an uptime check from the Uptime Checks dashboard, as described on this page. Don't use the Alerting dashboard.

Creating an alerting policy

You can create an alerting policy to notify you when an uptime check fails.

  1. Create the uptime check. In this example, the uptime check identifier is My Uptime Check.

  2. To create an alerting policy for your uptime check, go to Uptime Checks > Uptime Checks Overview, click More and select Create Alerting Policy.

    Create Alert Policy

  3. The Condition pane for an alerting policy is displayed:

    1. Click the Uptime Check tab if it isn't selected.
    2. Enter a title for the Condition.
    3. The Target and Configuration panes are pre-populated for you.
    4. Click Save.

    Create Condition

  4. The Create New Alerting Policy dialog is displayed:

    Create new Alerting Policy

    • To configure a notification channel, click Add Notification Channel. From the drop-down menu, select your preferred notification channel and enter any channel-specific information.
    • Optionally, enter a notification message in the Documentation pane.
    • Enter a name for your policy.
  5. Click Save. After the alerting policy is saved, a summary of the policy is displayed.

Editing and deleting an alerting policy

To edit or delete an alerting policy, from the Alerting > Policies Overview page, click the policy name, and then select Edit or Delete.

If you select edit, the Edit alerting policy page appears. From this page, you can edit the condition, notifications, documentation and policy name. After you have completed your modification and saved them, you might need to refresh your Stackdriver console to refresh the alerting policy summary.

Hai trovato utile questa pagina? Facci sapere cosa ne pensi:

Invia feedback per...

Stackdriver Monitoring