Set up alerts and notifications

Once you've configured AppNeta alarm rules to identify specific network events or performance issues, the alarms send structured logs to Cloud Logging. You can then create log-based alert policies in Google Cloud to act on these logs.

These alerts and notifications help you proactively respond to network incidents before customers start to call in, understand where and when troublespots developer, and surface hidden issues in your network.

Cloud Network Insights alerting is based on logs received from AppNeta's alarms. A log entry of structured data is sent from AppNeta to Cloud Logging.

Once received by Cloud Logging, logs are evaluated by log-based alert policies that filter logs for specific alarms. When a log matches an alert policy, an incident is created. After an incident is created, Google Cloud can send notifications through selected notification channels (email, Slack, PagerDuty, or Pub/Sub) when an incident occurs.

Cloud Network Insights provides alert policy templates for common alerting scenarios, such as when a Monitoring Point is offline or if there's an outage on a monitored network path, to simplify your alert policy setup. If you want to alert on incidents beyond the predefined templates, create an alert in Cloud Logging.

Before you begin

Alerts and notifications are only triggered when logging is set up in AppNeta and Cloud Logging receives alarm logs (insights_alarm) or event logs (insights_event).

Required roles

To get the permissions that you need to create log-based alert policies, ask your administrator to grant you the following IAM roles on the project in which Cloud Network Insights is enabled:

For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Create log-based alert policies

Once you have Alarm Rules configured in AppNeta, create alert policies in Google Cloud to receive notifications.

Use predefined templates

You can create alert policies using the predefined templates in Cloud Network Insights.

  1. Open the Google Cloud console and navigate to Network Intelligence > Cloud Network Insights > Alert Policies.

    Go to Alert Policies

  2. Click Create alert policy.

  3. Select an alert policy template.

  4. Optionally, customize the alert policy.

    • Click View more actions and select Customize alert policy to change which logs are included in the alert or the notification frequency and autoclose duration.
    • Click show options and modify the notification frequency and autoclose duration.
  5. Optionally choose where to receive notifications. If you don't have notification channels set up, see Create and manage notification channels.

  6. Click Create.

Use the Logs Explorer

You can also create log-based alerts in Logs Explorer using the Logging query language.

Cloud Network Insights logs use one of the following log IDs:

  • Alarm logs: networkmanagement.googleapis.com/insights_alarm
  • Event logs: networkmanagement.googleapis.com/insights_event

To match a log ID in a query, use the log_id function. If you filter on the logName field instead, use the full log name, which includes your project ID and the log ID. Replace the slash in the log ID with %2F. For example, to match alarm logs by logName, use logName="projects/PROJECT_ID/logs/networkmanagement.googleapis.com%2Finsights_alarm".

To identify when a critical alarm is raised on a specific network path or web path, enter the following query in the Logs Explorer Query pane:

log_id("networkmanagement.googleapis.com/insights_alarm")
resource.type="RESOURCE_TYPE"
resource.labels.path_id="PATH_ID"
jsonPayload.alarm_severity="CRITICAL"
jsonPayload.state="RAISED"

Replace the following:

  • RESOURCE_TYPE: networkmanagement.googleapis.com/NetworkPath for a network path, or networkmanagement.googleapis.com/WebPath for a web path.
  • PATH_ID: the ID of the path, which is shown in the ID column on the Network Paths or Web Paths page. The ID is also the last segment of the path's resource name.

To exclude alarms that are flagged as noisy, add NOT jsonPayload.noise_conditions:* to the query. For the other alarm_severity values and the fields that you can filter on, see Alarm log fields.

For more information, see Build and save queries by using the Logging query language and Create a log-based alerting policy by using the Logs Explorer.