Viewing 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 Explorer page.

    Go to Logs Explorer

  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.

All of the metrics in the following table measure user payload. They measure the bytes that were sent by the user, rather than the encapsulated traffic, which includes transport and network protocol headers. Also, depending on the type of transport, traffic might be compressed as part of transport.

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 (user payload) 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 (user payload) 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 (user payload) 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 (user payload) 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 (user payload) 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.

View Monitoring dashboards

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

View 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.

View 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 Metrics Explorer page within Monitoring.
  2. Go to Metrics Explorer

  3. In the toolbar, select the Explorer tab.
  4. Select the Configuration tab.
  5. Expand the Select a metric menu, enter networking in the filter bar, and then use the submenus to select a specific resource type and metric:
    1. In the Active resources menu, select a resource.
    2. To select a metric, use the Active metric categories and Active metrics menus. For a list of metrics, see Network Connectivity Center metrics list.
    3. Click Apply.
  6. Optional: To configure how the data is viewed, add filters and use the Group By, Aggregator, and chart-type menus. For example, you can group by resource or metric labels. For more information, see Select metrics when using Metrics Explorer.
  7. Optional: Change the graph settings:
    • For quota and other metrics that report one sample per day, set the time frame to at least one week and set the plot type to Stacked bar chart.
    • For distribution valued metrics, set the plot type to Heatmap chart.

Define 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