[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-05。"],[],[],null,["# Get diagnostics\n\nCloud Interconnect diagnostics let you troubleshoot your\nCross-Cloud Interconnect connections during provisioning and after\nactivation. The diagnostics provide you with current, detailed technical\ninformation about the Google Cloud side of your\nCross-Cloud Interconnect connection.\n\nDiagnostics during outages\n--------------------------\n\nDiagnostic results might not be available during a\n[global outage](https://status.cloud.google.com/) because the\nCross-Cloud Interconnect connection information is provided as\na global resource. A global outage might affect the diagnostics for\nCross-Cloud Interconnect from being fetched. However, these\nglobal outages don't necessarily reflect the functional state of the\ninterconnects or attachments.\n\nDiagnostics during provisioning\n-------------------------------\n\nDiagnostics contain different data depending on the stage of the\nprovisioning process. Your connection must meet the requirements of each\nstage before it can move on to the next one.\n\nThe stages are as follows:\n\n- **Stage 1 - Circuit connection:**\n\n - The optical power state is `OK`.\n - bundleOperationalStatus is `Down`.\n- **Stage 2 - Circuit qualification (multiple links):**\n\n - The optical power state is `OK`.\n - bundleOperationalStatus is `Down`.\n- **Stage 3 - Production configuration:**\n\n - The optical power state is `OK`.\n - bundleOperationalStatus is `Up`.\n\nUse diagnostics\n---------------\n\nTo interpret information that you get from the Google Cloud console,\nthe Google Cloud CLI, or the API, see the\n[Command output reference](#output-reference) section.\n\n#### Permissions required for this task\n\nTo perform this task, you must have been granted the following permissions\n*or* the following Identity and Access Management (IAM) roles.\n\n**Permissions**\n\n- `compute.interconnects.get`\n- `compute.interconnects.use`\n\n**Roles**\n\n- `roles/compute.networkAdmin` \n\n### Console\n\n1. In the Google Cloud console, go to the Cloud Interconnect **Physical\n connections** tab.\n\n [Go to Physical connections](https://console.cloud.google.com/hybrid/interconnects/list?tab=interconnects)\n2. Select the name of your Cross-Cloud Interconnect\n connection.\n\n3. Review the following fields:\n\n - For warnings or errors, see the **Status** field in the upper-left corner of the page.\n - For the provisioned capacity of the Cloud Interconnect connection, see the **Provisioned capacity** field.\n - If you suspect issues with the Cloud Interconnect connection, see the **VLAN attachments** section for information such as the effective capacity of the connection or the number of down links.\n - For additional details, such as light levels, see the **Link\n circuit info** section.\n\n### gcloud\n\nUse the\n[`gcloud compute interconnects get-diagnostics` command](/sdk/gcloud/reference/compute/interconnects/get-diagnostics): \n\n```\ngcloud compute interconnects get-diagnostics NAME \\\n --project=PROJECT_ID\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of the connection\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the Google Cloud project\n\nThe command output should look similar to the following: \n\n```\nresult:\nbundleAggregationType: BUNDLE_AGGREGATION_TYPE_LACP\nbundleOperationalStatus: BUNDLE_OPERATIONAL_STATUS_UP\nlinks:\n- circuitId: GCP-00112\ngoogleDemarc: MARKL:MMR A/ 4th floor Cab 04.105.004.704 FP 4 Port 3 Fibers 77,78\n -LC\nlacpStatus:\n googleSystemId: 9c:e1:76:7a:40:de\n neighborSystemId: ec:ce:13:e2:99:07\n state: ACTIVE\noperationalStatus: LINK_OPERATIONAL_STATUS_UP\nreceivingOpticalPower:\n state: OK\n value: -2.94\ntransmittingOpticalPower:\n state: OK\n value: -1.66\nmacAddress: 9c:e1:76:7a:40:e3\n```\n\n### API\n\nUse the [`interconnects.getDiagnostics` method](/compute/docs/reference/rest/v1/interconnects/getDiagnostics): \n\n```\n GET https://compute.googleapis.com/compute/projects/PROJECT_ID/global/interconnects/NAME/getDiagnostics\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the Google Cloud project\n- \u003cvar translate=\"no\"\u003eNAME\u003c/var\u003e: the name of your connection\n\nIf this command succeeds, it returns `InterconnectDiagnostics` output in the\nfollowing format. \n\n```\n{\n\"result\": {\n\"macAddress\": \"9c:e1:76:7a:40:e3\",\n\"links\": [\n {\n \"circuitId\": \"GCP-00112\",\n \"googleDemarc\": \"MARKL:MMR A/ 4th floor Cab 04.105.004.704 FP 4 Port 3 Fibers 77,78 -LC\",\n \"receivingOpticalPower\": {\n \"value\": -2.97,\n \"state\": \"OK\"\n },\n \"transmittingOpticalPower\": {\n \"value\": -1.67,\n \"state\": \"OK\"\n },\n \"lacpStatus\": {\n \"state\": \"ACTIVE\",\n \"googleSystemId\": \"9c:e1:76:7a:40:de\",\n \"neighborSystemId\": \"ec:ce:13:e2:99:07\"\n },\n \"operationalStatus\": \"LINK_OPERATIONAL_STATUS_UP\"\n }\n],\n\"bundleOperationalStatus\": \"BUNDLE_OPERATIONAL_STATUS_UP\",\n\"bundleAggregationType\": \"BUNDLE_AGGREGATION_TYPE_LACP\"\n}\n}\n```\n\nCommand output reference\n------------------------\n\nTo interpret diagnostics output, see the following table.\n| **Note:** If you want to create an alert for the value of the transmitting and receiving optical power, you can take a known good optical value, give it a 10% margin, and create alerts relative to that value. In general, a `-7dBm` warning and a `-11dBm` alarm are good optical value estimates for most links.\n\nWhat's next\n-----------\n\n- To learn more about Cross-Cloud Interconnect, see the\n [Cross-Cloud Interconnect overview](/network-connectivity/docs/interconnect/concepts/cci-overview).\n\n- To learn about common issues that you might encounter when using\n Cross-Cloud Interconnect, see\n [Troubleshooting](/network-connectivity/docs/interconnect/support/troubleshooting#cci)."]]