패킷 미러링은 미러링된 트래픽에 대한 모니터링 데이터를 Cloud Monitoring으로 내보냅니다. 모니터링 측정항목을 사용하여 가상 머신(VM) 인스턴스의 트래픽이 의도한 대로 미러링되었는지 확인할 수 있습니다. 예를 들어 특정 인스턴스의 미러링된 패킷 또는 바이트 수를 볼 수 있습니다.
미러링된 VM 인스턴스 또는 수집기 대상의 일부인 인스턴스(내부 패스 스루 네트워크 부하 분산기)의 모니터링 측정항목을 볼 수 있습니다. 미러링된 VM 인스턴스의 경우 패킷 미러링은 미러링된 패킷에 대한 측정항목(예: /mirroring/mirrored_packets_count, /mirroring/mirrored_bytes_count, /mirroring/dropped_packets_count)을 제공합니다. 자세한 내용은 Monitoring 문서에서 Compute Engine의 측정항목 목록을 참조하세요.
수집기 대상의 측정항목은 수집하는 모든 미러링된 트래픽의 집계 보기를 제공합니다. 그러나 미러링된 개별 인스턴스는 삭제된 미러링된 패킷 개수를 볼 수 있습니다.
수집기 대상의 측정항목에는 삭제된 패킷이 포함되지 않습니다. 수집기 대상의 모니터링에 대한 자세한 내용은 내부 패스 스루 네트워크 부하 분산기 로깅 및 모니터링을 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[],[],null,["# Monitor Packet Mirroring\n========================\n\nPacket Mirroring exports monitoring data about mirrored traffic to\n[Cloud Monitoring](/monitoring/docs). You can use monitoring metrics to\ncheck whether traffic from a virtual machine (VM) instance is being mirrored\nas intended. For example, you can view the mirrored packet or byte count for\na particular instance.\nYou can view the monitoring metrics of mirrored VM instances or instances that are part of the collector destination (internal passthrough Network Load Balancer). For mirrored VM instances, Packet Mirroring provides metrics specific to mirrored packets, such as `/mirroring/mirrored_packets_count`, `/mirroring/mirrored_bytes_count`, and `/mirroring/dropped_packets_count`. For more information, see the [metrics list](/monitoring/api/metrics_gcp_c#gcp-compute) for Compute Engine in the Monitoring documentation.\n\nThe metrics for the collector destination provides an aggregate view of all\nmirrored traffic that it collects. However, for the individual mirrored\ninstances, you can view the number of mirrored packets that were dropped.\nMetrics for the collector destination don't include dropped packets. For more\ninformation about monitoring the collector destination, see\n[Internal passthrough Network Load Balancer logging and monitoring](/load-balancing/docs/internal/internal-logging-monitoring).\n\n\nView packet mirroring metrics in the Compute Engine console\n-----------------------------------------------------------\n\n1. Go to the **VM instances** page.\n\n [Go to the VM instances page](https://console.cloud.google.com/compute/instances)\n2. Select the project that contains the mirrored instance.\n\n3. Click the name of the mirrored instance to view its details.\n\n4. Click the **Monitoring** tab.\n\n5. View the **Mirrored Network Bytes** and **Mirrored Network Packets** charts\n to see the mirrored bytes and mirrored packets. The Mirrored Network Packets\n chart shows the number of successful and dropped mirrored packets.\n\nView the monitoring dashboard for a mirrored instance\n-----------------------------------------------------\n\nTo view the automatically created monitoring dashboard for a mirrored instance,\ndo the following:\n\n1. In the Google Cloud console, go to the **Dashboards** page:\n\n [Go to **Dashboards**](https://console.cloud.google.com/monitoring/dashboards)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Monitoring**.\n2. In the **All Dashboards** pane, select the **Mirrored Instances**\n from the list.\n\n3. Click list **List** and then select the\n name of a mirrored instance.\n\nWhen you access the dashboard, Cloud Monitoring shows time series charts,\nsuch as the number of packets mirrored.\n\nDefine Monitoring alerts\n------------------------\n\nYou can define\n[alerts](/monitoring/alerts)\nover the packet mirroring metrics:\n\n1. In the Google Cloud console, go to the **Monitoring** page.\n\n [Go to Monitoring](https://console.cloud.google.com/monitoring)\n2. Click **Alerting**.\n\n3. Click **Create Policy**.\n\n4. Click **Add Condition** and select condition type.\n\n5. In the **Metric** tab, select a target.\n\n 1. For the resource type, **VM Instance**.\n 2. Select a [packet mirroring metric](/monitoring/api/metrics_gcp_c#gcp-compute).\n6. Click **Save Condition**.\n\n7. Enter a policy name in the **Name this policy** field and click\n **Save Policy**.\n\nDefine custom dashboards\n------------------------\n\nIn addition to the predefined dashboards in Cloud Monitoring, you can\ncreate custom dashboards, set up alert policies, and query the metrics through\nthe [Cloud Monitoring API](/monitoring/api).\n\nOn the Cloud Monitoring dashboard, **Open Incidents** are\ndriven by the alerting policies that you configure. Alerts appear as *incidents*\non the dashboard when the alert is triggered. These are general functions of\nCloud Monitoring.\n\nYou can create custom Cloud Monitoring dashboards over packet mirroring\nmetrics:\n\n1. In the Google Cloud console, go to the **Monitoring** page.\n\n [Go to Monitoring](https://console.cloud.google.com/monitoring)\n2. Click **Dashboards**.\n\n3. Click **Create Dashboard**.\n\n4. Select a chart type to create.\n\n5. Give the chart a title.\n\n6. In the **Metric** tab, select a target.\n\n 1. For the resource type, **VM Instance**.\n 2. Select a [packet mirroring metric](/monitoring/api/metrics_gcp_c#gcp-compute).\n7. Click **Save**.\n\nMetric reporting frequency and retention\n----------------------------------------\n\nMetrics for the VPC security policies are exported to\nCloud Monitoring in 1-minute granularity batches. Monitoring data is\nretained for six weeks. The dashboard provides data analysis in the following\ndefault intervals:\n\n- 1H (one hour)\n- 6H (six hours)\n- 1D (one day)\n- 1W (one week)\n- 6W (six weeks)\n\nUsing the controls in the upper-right hand corner of the Cloud Monitoring\npage, you can manually request analysis in any interval from 6W to 1 minute.\nFor more information about Cloud Monitoring, see the\n[Cloud Monitoring documentation](/monitoring/docs).\n\nWhat's next\n-----------\n\nFor more information about Cloud Monitoring, see the\n[Cloud Monitoring documentation](/monitoring/docs)."]]