Viewing Network Connectivity Center logs and metrics

This page describes logs and metrics for Network Connectivity Center and metrics for Router appliance.

Logging for Router appliance is handled by Cloud Router; for more information, see Viewing Cloud Router logs and metrics.

How metrics work

The local_resource_type label reports the number of data transfer bytes on the Google Cloud side of the resource monitored. That is, the label reports when the resource attached to a spoke sends traffic to another Google Cloud resource.

The local_resource_type label can take one of the following values:

  • A Compute Engine virtual machine (VM) value called GCE_VM
  • An HA VPN gateway value called VPN
  • A VLAN attachment value for an Interconnect connection called ICA
  • A value for traffic to all other resources called OTHER
  • A value for the router appliance instance called ROUTER_APPLIANCE

If the local_resource_type is VPN, ICA, or ROUTER_APPLIANCE, the metric reports data transfer information. For more information about data transfer, see Network Connectivity Center overview.

Logs

Network Connectivity Center hubs send logs to Logging.

How to view logs

To view logs for Network Connectivity Center, follow these steps.

Console

  1. In the Google Cloud Console, go to the Logs Viewer page.

    Go to Logs Viewer

  2. To see all Network Connectivity Center logs, on the first pull-down menu, select the metric for the spoke resource attached to the spoke. For example, HA VPN.

    To see logs for just one hub, on the menu, select a single hub name.

    Log fields of type boolean typically only appear if they have a value of true. If a boolean field has a value of false, that field is omitted from the log.

    UTF-8 encoding is enforced for log fields. Characters that are not UTF-8 characters are replaced with question marks.

Routing logs

You can configure the sinks of logs-based metrics for Network Connectivity Center resource logs.

Logging stores Network Connectivity Center logs for only 30 days. If you want to keep your logs for a longer period, you must route them.

You can route Network Connectivity Center logs to Pub/Sub or BigQuery for analysis.

What is logged

Network Connectivity Center log entries contain the following types of information that is useful for monitoring and debugging your hubs:

  • General information shown in most Google Cloud logs, such as severity, project ID, project number, and timestamp.
  • Other information that varies depending on the log entry.

Monitoring metrics

To view metrics and create alerts related to your Network Connectivity Center spokes, use Cloud Monitoring.

In addition to the predefined dashboards in Monitoring, you can create custom dashboards, set up alerts, and query the metrics through the Monitoring API.

Monitoring metrics for Network Connectivity Center

The following metrics for the connectivity_hub resource type are reported into Monitoring.

Metric name Metric name in the Monitoring API Description
Interconnect Egress bytes networking.googleapis.com/interconnect_attachment/egress_bytes_count Indicates the number of bytes sent (user payload) from Google Cloud through the VLAN attachment to locations outside of Google Cloud—for example, to on-premises hosts or to other cloud providers. Sampled every 60 seconds. After sampling, data is not visible for up to five minutes.
Interconnect Ingress bytes networking.googleapis.com/interconnect_attachment/ingress_bytes_count Indicates the number of bytes sent to Google Cloud, through the VLAN attachment from locations outside of Google Cloud—for example, from on-premises hosts or from other cloud providers. Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds.
VPN tunnel Egress bytes networking.googleapis.com/vpn_tunnel/egress_bytes_count Indicates the number of bytes sent from Google Cloud through the HA VPN tunnel to the other side of the tunnel. Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds.
VPN tunnel Ingress bytes networking.googleapis.com/vpn_tunnel/ingress_bytes_count Indicates the number of bytes sent to Google Cloud through the HA VPN tunnel from the other side of the tunnel. Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds.
Router appliance Egress bytes networking.googleapis.com/router_appliance/gateway/egress_bytes_count Indicates the number of bytes sent through and from the router appliance instance to locations outside of Google Cloud. For example, to on-premises hosts or to other cloud providers. Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds.
Router appliance Ingress bytes networking.googleapis.com/router_appliance/gateway/ingress_bytes_count Indicates the number of bytes sent to the router appliance instance from locations outside of Google Cloud. For example, from on-premises hosts or from other cloud providers. Sampled every 60 seconds. After sampling, data is not visible for up to 150 seconds.

Viewing Monitoring dashboards

You can view Monitoring dashboards for Network Connectivity Center in multiple ways.

Viewing metrics for the Network Connectivity Center hub resource

Console

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

    Go to Monitoring

  2. If the Monitoring navigation pane displays Resources, select Resources, and then select the resource type such as Interconnect or VPN Tunnel. To view the dashboard for a specific hub, locate it in the list and then click its name.

  3. Otherwise, select Dashboards, and then select the dashboard named Network Connectivity Center hub. The Inventory card contains a list of hubs. To view the dashboard for a specific hub, locate it in the list, and then click its name.

Viewing metrics in Metrics Explorer

Console

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. Enter or select the resource type as the Resource.
    2. Enter a metric name from the Network Connectivity Center metrics list or select a metric that appears in the menu.
  4. (Optional) To configure how the data is viewed, use the Filter, Group By and Aggregator menus. For example, you can group by resource or metric labels. For more information, see Selecting metrics.

Defining custom dashboards

To create custom Monitoring dashboards over Network Connectivity Center metrics, follow these steps:

Console

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

    Go to Monitoring

  2. Select Dashboards, and then select Create Dashboard.

  3. Click Add Chart.

  4. Give the chart a title.

  5. Select metrics and filters. For metrics, the resource type is Connectivity Hub.

  6. Click Save.

What's next