收集 AWS EC2 執行個體記錄

剖析器版本:1.0

支援的國家/地區:

本文說明如何將 AWS EC2 執行個體記錄檔設定至 Google Security Operations,以便監控及分析。剖析器會從執行個體預留 JSON 記錄擷取資料,並重新建構及重新命名欄位,以符合 UDM 規範,同時處理各種資料類型和巢狀結構 (包括網路介面、群組和標記),以及產生資產關係和中繼資料。此外,這個函式也會處理錯誤,並捨棄格式錯誤的 JSON 訊息。

事前準備

  • 確認您擁有 Google SecOps 執行個體。
  • 確認您具備 AWS 的特殊權限存取權。

設定 AWS IAM 和 S3

  1. 按照這份使用手冊的指示建立 Amazon S3 儲存空間:建立儲存空間。
  2. 儲存 bucket 的名稱和區域,稍後會用到。
  3. 按照這份使用者指南建立使用者:建立 IAM 使用者。
  4. 選取建立的「使用者」。
  5. 選取「安全憑證」分頁標籤。
  6. 在「存取金鑰」部分,按一下「建立存取金鑰」。
  7. 選取「第三方服務」做為「用途」。
  8. 點選「下一步」。
  9. 選用:新增說明標記。
  10. 按一下「建立存取金鑰」。
  11. 按一下「下載 CSV 檔案」,儲存「存取金鑰」和「私密存取金鑰」以供日後使用。
  12. 按一下「完成」。
  13. 選取 [權限] 分頁標籤。
  14. 在「權限政策」部分,按一下「新增權限」。
  15. 選取「新增權限」。
  16. 選取「直接附加政策」
  17. 搜尋並選取「AmazonS3FullAccess」AmazonS3FullAccess政策。
  18. 點選「下一步」。
  19. 按一下「Add permissions」。

設定 EC2,將記錄傳送至 CloudWatch Logs

  1. 使用 SSH 連線至 EC2 執行個體,並提供金鑰組進行驗證。

    ssh -i your-key.pem ec2-user@your-ec2-public-ip
    
  2. 安裝 CloudWatch Logs 代理程式:

    • 如要在 Amazon Linux 上安裝 CloudWatch Logs 代理程式,請使用下列指令:
    sudo yum install -y awslogs
    
    • 如要在 Ubuntu 上安裝 CloudWatch Logs 代理程式,請使用下列指令:
    sudo apt-get install -y awslogs
    
  3. 開啟 CloudWatch Logs 設定檔:

    sudo vi /etc/awslogs/awslogs.conf
    
  4. 建立指令碼,擷取這項記錄執行個體中繼資料,並寫入檔案:

    #!/bin/bash
    echo "Architecture: $(curl -s http://169.254.169.254/latest/meta-data/architecture)" >> /var/log/instance_metadata.log
    echo "AmiLaunchIndex: $(curl -s http://169.254.169.254/latest/meta-data/ami-launch-index)" >> /var/log/instance_metadata.log
    echo "BootMode: $(curl -s http://169.254.169.254/latest/meta-data/boot-mode)" >> /var/log/instance_metadata.log
    
  5. 將指令碼儲存為 /etc/init.d/metadata_script.sh,並在執行個體啟動時使用 crontab 或 rc.local 執行。

  6. 開啟 CloudWatch Logs 代理程式的設定檔:

    sudo vi /etc/awslogs/awslogs.conf
    
  7. 在設定檔中新增下列內容:

    [/var/log/messages]
    file = /var/log/messages
    log_group_name = /ec2/system/logs
    log_stream_name = {instance_id}
    
    [/var/log/secure]
    file = /var/log/secure
    log_group_name = /ec2/security/logs
    log_stream_name = {instance_id}
    
    [/var/log/auth.log]
    file = /var/log/auth.log
    log_group_name = /ec2/auth/logs
    log_stream_name = {instance_id}
    
    [/var/log/httpd/access_log]
    file = /var/log/httpd/access_log
    log_group_name = /ec2/application/apache/access_logs
    log_stream_name = {instance_id}
    
    [/var/log/httpd/error_log]
    file = /var/log/httpd/error_log
    log_group_name = /ec2/application/apache/error_logs
    log_stream_name = {instance_id}
    
  8. 儲存設定並結束編輯器。

  9. 啟動 CloudWatch Logs 代理程式:

    • 在 Amazon Linux 上:
    sudo service awslogs start
    
    • 在 Ubuntu 上:
    sudo service awslogs start
    
  10. 確認代理程式正在執行:

    sudo service awslogs status
    

設定 Lambda 和 S3 的 IAM 權限

  1. 在 AWS IAM 控制台中,建立新的 IAM 角色,並授予下列權限:

    • logs:PutSubscriptionFilter
    • logs:DescribeLogGroups
    • logs:GetLogEvents
    • s3:PutObject
  2. 將這個角色附加至會將記錄匯出至 S3 的 Lambda 函式。

設定 Lambda 將記錄匯出至 S3

  1. 前往 Lambda 控制台,建立新函式。

    import boto3
    import gzip
    from io import BytesIO
    
    s3 = boto3.client('s3')
    logs = boto3.client('logs')
    
    def lambda_handler(event, context):
        log_group = event['logGroup']
        log_stream = event['logStream']
    
        log_events = logs.get_log_events(
            logGroupName=log_group,
            logStreamName=log_stream,
            startFromHead=True
        )
    
        log_data = "\n".join([event['message'] for event in log_events['events']])
    
        # Compress and upload to S3
        compressed_data = gzip.compress(log_data.encode('utf-8'))
        s3.put_object(
            Bucket='your-s3-bucket-name',
            Key='logs/ec2-log.gz',
            Body=compressed_data
        )
      ```
    
    • 將 your-s3-bucket-name 替換為 S3 bucket 的實際名稱。
  2. 將 IAM 角色附加至先前建立的 Lambda 函式。

  3. 在 CloudWatch 控制台中,前往「Logs」部分。

  4. 選取記錄檔群組,例如 /ec2/system/logs。

  5. 依序點選「動作」>「建立訂閱篩選器」。

  6. 將「destination」(目的地) 設為先前建立的「Lambda function」(Lambda 函式)。

在 Google SecOps 中設定資訊提供,擷取 AWS EC2 執行個體記錄

  1. 依序前往「SIEM 設定」>「動態饋給」。
  2. 按一下「新增動態饋給」。
  3. 在「Feed name」(動態饋給名稱) 欄位中輸入動態饋給名稱,例如 AWS EC2 Instance Logs。
  4. 選取「Amazon S3 V2」做為「來源類型」。
  5. 「記錄類型」請選取「AWS EC2 執行個體」。
  6. 點選「下一步」。
  7. 指定下列輸入參數的值:

    • S3 URI:bucket URI。
      • s3://your-log-bucket-name/
        • 將 your-log-bucket-name 替換為 bucket 的實際名稱。
    • 來源刪除選項:根據偏好選取刪除選項。

    • 檔案存在時間上限:納入在過去天數內修改的檔案。預設值為 180 天。

    • 存取金鑰 ID:具有 S3 bucket 存取權的使用者存取金鑰。

    • 私密存取金鑰:具有 S3 bucket 存取權的使用者私密金鑰。

    • Asset namespace:資產命名空間。

    • 擷取標籤:要套用至這個動態饋給事件的標籤。

  8. 點選「下一步」。

  9. 在「Finalize」(完成) 畫面中檢查新的動態饋給設定,然後按一下「Submit」(提交)。

支援的 AWS EC2 執行個體記錄格式

AWS EC2 執行個體剖析器支援 JSON 格式的記錄。

支援的 AWS EC2 執行個體範例記錄

  • JSON:

    {
      "GroupSet": null,
      "InstancesSet": [
        {
          "AmiLaunchIndex": 0,
          "Architecture": "x86_64",
          "BlockDeviceMapping": [
            {
              "DeviceName": "",
              "Ebs": null
            }
          ],
          "BootMode": "",
          "CapacityReservationID": "",
          "CapacityReservationSpecification": null,
          "ClientToken": "xMcwG14507example",
          "CPU": {
            "AmdSevSnp": "",
            "CoreCount": 1,
            "ThreadsPerCore": 1
          },
          "CurrentInstanceBootMode": "",
          "DNSName": "ec2-198-51-100-1.eu-west-1.compute.amazonaws.com",
          "EbsOptimized": false,
          "ElasticGpuAssociationSet": null,
          "ElasticInferenceAcceleratorAssociationSet": null,
          "EnaSupport": false,
          "EnclaveOption": false,
          "GroupSet": [
            {
              "GroupID": "sg-c1234567",
              "GroupName": "SecurityGroup1"
            }
          ],
          "HibernationOptions": false,
          "Hypervisor": "xen",
          "IamInstanceProfile": {
            "Arn": "arn:aws:iam::123456789012:instance-profile/AdminRole",
            "ID": "ABCDEFGHIJKLMNOP123AB"
          },
          "ImageID": "ami-abc32ddd",
          "InstanceID": "i-1234567890abcdef0",
          "InstanceLifecycle": "",
          "InstanceState": {
            "Code": 16,
            "Name": "running"
          },
          "InstanceType": "t2.micro",
          "IPAddress": "198.51.100.1",
          "Ipv6Address": "",
          "KernelID": "",
          "KeyName": "my_keypair",
          "LaunchTime": "2018-05-08T16:46:19.000Z",
          "LicenseSet": null,
          "MaintenanceOptions": "",
          "MetadataOptions": {
            "HTTPEndpoint": "",
            "HTTPProtocolIpv6": "",
            "HTTPPutResponseHopLimit": 0,
            "HTTPTokens": "",
            "InstanceMetadataTags": "",
            "State": ""
          },
          "Monitoring": {
            "State": "disabled"
          },
          "NetworkInterfaceSet": [
            {
              "Association": {
                "CarrierIP": "",
                "CustomerOwnedIP": "",
                "IPOwnerID": "amazon",
                "PublicDNSName": "ec2-198-51-100-1.eu-west-1.compute.amazonaws.com",
                "PublicIP": "198.51.100.1"
              },
              "Attachment": {
                "AttachmentID": "eni-attach-12345abc",
                "AttachTime": "2018-05-08T16:46:19.000Z",
                "DeleteOnTermination": true,
                "DeviceIndex": 0,
                "NetworkCardIndex": 0,
                "Status": "attached"
              },
              "Description": "Primary network interface",
              "GroupSet": [
                {
                  "GroupID": "sg-a1234567",
                  "GroupName": "SecurityGroup1"
                }
              ],
              "InterfaceType": "",
              "Ipv4PrefixSet": null,
              "Ipv6AddressesSet": [
                {
                  "Ipv6Address": "d9a3:d3b1:03e0:0279:5196:3b5c:242b:10da",
                  "IsPrimaryIpv6": false
                }
              ],
              "Ipv6PrefixSet": null,
              "MacAddress": "a2-d4-a6-24-12-f4",
              "NetworkInterfaceID": "eni-551ba033",
              "OwnerID": "123456789012",
              "PrivateDNSName": "ip-198-51-100-1.eu-west-1.compute.internal",
              "PrivateIPAddress": "198.51.100.1",
              "PrivateIPAddressesSet": [
                {
                  "Association": {
                    "CarrierIP": "",
                    "CustomerOwnedIP": "",
                    "IPOwnerID": "amazon",
                    "PublicDNSName": "ec2-198-51-100-1.eu-west-1.compute.amazonaws.com",
                    "PublicIP": "198.51.100.1"
                  },
                  "Primary": true,
                  "PrivateDNSName": "ip-198-51-100-1.eu-west-1.compute.internal",
                  "PrivateIPAddress": "198.51.100.1"
                }
              ],
              "SourceDestCheck": true,
              "Status": "in-use",
              "SubnetID": "subnet-56f5f633",
              "VpcID": "vpc-11112222"
            }
          ],
          "OutpostArn": "",
          "Placement": {
            "Affinity": "",
            "AvailabilityZone": "eu-west-1c",
            "GroupID": "",
            "GroupName": "",
            "HostID": "",
            "HostResourceGroupArn": "",
            "PartitionNumber": 0,
            "SpreadDomain": "",
            "Tenancy": "default"
          },
          "Platform": "",
          "PlatformDetails": "",
          "PrivateDNSName": "ip-198-51-100-1.eu-west-1.compute.internal",
          "PrivateDNSNameOptions": null,
          "PrivateIPAddress": "198.51.100.1",
          "ProductCodes": null,
          "RamdiskID": "",
          "Reason": "",
          "RootDeviceName": "/dev/xvda",
          "RootDeviceType": "ebs",
          "SourceDestCheck": true,
          "SpotInstanceRequestID": "",
          "SriovNetSupport": "",
          "StateReason": "",
          "SubnetID": "subnet-56f5f633",
          "TagSet": [
            {
              "Key": "Name",
              "Value": "Server_1"
            }
          ],
          "TpmSupport": "",
          "UsageOperation": "",
          "UsageOperationUpdateTime": "",
          "VirtualizationType": "hvm",
          "VpcID": "vpc-11112222"
        }
      ],
      "OwnerID": "123456789012",
      "RequesterID": "",
      "ReservationID": "r-1234567890abcdef0"
    }
    

UDM 對應表

記錄欄位 UDM 對應 邏輯
Architecture entity.entity.asset.attribute.labels.key=instances_set_architecture、entity.entity.asset.attribute.labels.value 這個值直接取自原始記錄中的 Instances.Architecture 欄位。
AmiLaunchIndex entity.entity.asset.attribute.labels.key=instances_set_ami_launch_index、entity.entity.asset.attribute.labels.value 這個值直接取自原始記錄中的 Instances.AmiLaunchIndex 欄位。
BlockDeviceMapping.Ebs.AttachTime entity.entity.resource_ancestors.attribute.labels.key=instances_set_block_device_mapping_ebs_attach_time、entity.entity.resource_ancestors.attribute.labels.value 這個值取自 Instances.BlockDeviceMapping.Ebs.AttachTime。
BlockDeviceMapping.Ebs.DeleteOnTermination entity.entity.resource_ancestors.attribute.labels.key=instances_set_block_device_mapping_ebs_delete_on_termination、entity.entity.resource_ancestors.attribute.labels.value 這個值取自 Instances.BlockDeviceMapping.Ebs.DeleteOnTermination。
BlockDeviceMapping.Ebs.Status entity.entity.resource_ancestors.attribute.labels.key=instances_set_block_device_mapping_ebs_volume_status、entity.entity.resource_ancestors.attribute.labels.value 這個值取自 Instances.BlockDeviceMapping.Ebs.Status。
BlockDeviceMapping.Ebs.VolumeID entity.entity.resource_ancestors.product_object_id、entity.entity.resource_ancestors.resource_type=VOLUME 這個值取自 Instances.BlockDeviceMapping.Ebs.VolumeID。
BlockDeviceMapping.Name entity.entity.resource_ancestors.attribute.labels.key=instances_set_block_device_mapping_device_name、entity.entity.resource_ancestors.attribute.labels.value 這個值取自 Instances.BlockDeviceMapping.Name。
BootMode entity.entity.asset.attribute.labels.key=instances_set_boot_mode、entity.entity.asset.attribute.labels.value 這個值取自 Instances.BootMode。
CapacityReservationID entity.entity.asset.attribute.labels.key=instances_set_capacity_reservation_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.CapacityReservationID。
CapacityReservationSpecification.CapacityReservationPreference entity.entity.asset.attribute.labels.key=instances_set_capacity_reservation_specification_capacity_reservation_preference、entity.entity.asset.attribute.labels.value 這個值取自 Instances.CapacityReservationSpecification.CapacityReservationPreference。
CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID entity.entity.asset.attribute.labels.key=instances_set_capacity_reservation_specification_capacity_reservation_target_capacity_reservation_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID。
CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupArn entity.entity.resource_ancestors.name、entity.entity.resource_ancestors.resource_subtype=Capacity Reservation Arn 這個值取自 Instances.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupArn。
ClientToken entity.entity.asset.attribute.labels.key=instances_set_client_token、entity.entity.asset.attribute.labels.value 這個值取自 Instances.ClientToken。
CPU.AmdSevSnp entity.entity.asset.attribute.labels.key=instances_set_cpu_options_amd_sev_snp、entity.entity.asset.attribute.labels.value 這個值取自 Instances.CPU.AmdSevSnp。
CPU.CoreCount entity.entity.asset.hardware.cpu_number_cores 這個值取自 Instances.CPU.CoreCount。
CPU.ThreadsPerCore entity.entity.asset.attribute.labels.key=instances_set_cpu_options_threads_per_core、entity.entity.asset.attribute.labels.value 這個值取自 Instances.CPU.ThreadsPerCore。
CurrentInstanceBootMode entity.entity.asset.attribute.labels.key=instances_set_current_instance_boot_mode、entity.entity.asset.attribute.labels.value 這個值取自 Instances.CurrentInstanceBootMode。
DNSName entity.entity.network.dns_domain 這個值取自 Instances.DNSName。
EbsOptimized entity.entity.asset.attribute.labels.key=instances_set_ebs_optimized、entity.entity.asset.attribute.labels.value 這個值取自 Instances.EbsOptimized。
ElasticGpuAssociationSet.ElasticGpuAssociationID entity.entity.asset.attribute.labels.key=instances_set_elastic_gpu_association_set_elastic_gpu_association_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.ElasticGpuAssociationSet.ElasticGpuAssociationID。
ElasticGpuAssociationSet.ElasticGpuAssociationState entity.entity.asset.attribute.labels.key=instances_set_elastic_gpu_association_set_elastic_gpu_association_state、entity.entity.asset.attribute.labels.value 這個值取自 Instances.ElasticGpuAssociationSet.ElasticGpuAssociationState。
ElasticGpuAssociationSet.ElasticGpuAssociationTime entity.entity.asset.attribute.labels.key=instances_set_elastic_gpu_association_set_elastic_gpu_association_time、entity.entity.asset.attribute.labels.value 這個值取自 Instances.ElasticGpuAssociationSet.ElasticGpuAssociationTime。
ElasticGpuAssociationSet.ElasticGpuID entity.entity.asset.attribute.labels.key=instances_set_elastic_gpu_association_set_elastic_gpu_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.ElasticGpuAssociationSet.ElasticGpuID。
ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorArn entity.entity.resource_ancestors.name、entity.entity.resource_ancestors.resource_subtype=Elastic Interface Accelerator Arn 這個值取自 Instances.ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorArn。
ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorAssociationID entity.entity.resource_ancestors.attribute.labels.key=instances_set_elastic_inference_accelerator_association_set_elastic_inference_accelerator_association_id、entity.entity.resource_ancestors.attribute.labels.value 這個值取自 Instances.ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorAssociationID。
ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorAssociationState entity.entity.resource_ancestors.attribute.labels.key=instances_set_elastic_inference_accelerator_association_set_elastic_inference_accelerator_association_state、entity.entity.resource_ancestors.attribute.labels.value 這個值取自 Instances.ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorAssociationState。
ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorAssociationTime entity.entity.resource_ancestors.attribute.labels.key=instances_set_elastic_inference_accelerator_association_set_elastic_inference_accelerator_association_time、entity.entity.resource_ancestors.attribute.labels.value 這個值取自 Instances.ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorAssociationTime。
EnaSupport entity.entity.asset.attribute.labels.key=instances_set_ena_support、entity.entity.asset.attribute.labels.value 這個值取自 Instances.EnaSupport。
EnclaveOptions.Enabled entity.entity.asset.attribute.labels.key=instances_set_enclave_options_enabled、entity.entity.asset.attribute.labels.value 這個值取自 Instances.EnclaveOptions.Enabled。
GroupSet.GroupID entity.entity.group.product_object_id、entity.entity.group.attribute.labels.key=group_set_group_id、entity.entity.group.attribute.labels.value、entity.entity.group.attribute.labels.key=instances_set_group_set_group_id、entity.entity.group.attribute.labels.value、entity.entity.group.attribute.labels.key=instances_set_network_interface_set_group_set_group_id、entity.entity.group.attribute.labels.value 這個值取自 GroupSet.GroupID。陣列中的第一個 GroupID 會對應至 entity.entity.group.product_object_id。後續的 GroupID 值會對應為標籤。
GroupSet.GroupName entity.entity.group.group_display_name、entity.entity.group.attribute.labels.key=group_set_group_name、entity.entity.group.attribute.labels.value、entity.entity.group.attribute.labels.key=instances_set_group_set_group_name、entity.entity.group.attribute.labels.value、entity.entity.group.attribute.labels.key=instances_set_network_interface_set_group_set_group_name、entity.entity.group.attribute.labels.value 這個值取自 GroupSet.GroupName。陣列中的第一個 GroupName 會對應至 entity.entity.group.group_display_name。後續的 GroupName 值會對應為標籤。
HibernationOptions entity.entity.asset.attribute.labels.key=instances_set_hibernation_options、entity.entity.asset.attribute.labels.value 這個值取自 Instances.HibernationOptions。
HibernationOptions.Configured entity.entity.asset.attribute.labels.key=instances_set_hibernation_options_configured、entity.entity.asset.attribute.labels.value 這個值取自 Instances.HibernationOptions.Configured。
Hypervisor entity.entity.asset.attribute.labels.key=instances_set_hypervisor、entity.entity.asset.attribute.labels.value 這個值取自 Instances.Hypervisor。
IamInstanceProfile.Arn entity.entity.resource_ancestors.name、entity.entity.resource_ancestors.resource_subtype=Instance Profile Arn 這個值取自 Instances.IamInstanceProfile.Arn。
IamInstanceProfile.ID entity.entity.resource_ancestors.product_object_id 這個值取自 Instances.IamInstanceProfile.ID。
ImageID entity.entity.resource_ancestors.product_object_id、entity.entity.resource_ancestors.resource_type=IMAGE 這個值取自 Instances.ImageID。
InstanceID entity.metadata.product_entity_id、entity.entity.asset.asset_id 這個值取自 Instances.InstanceID。
InstanceLifecycle entity.entity.asset.attribute.labels.key=instances_set_instance_lifecycle、entity.entity.asset.attribute.labels.value 這個值取自 Instances.InstanceLifecycle。
InstanceState.Code entity.entity.asset.attribute.labels.key=instances_set_instance_state_code、entity.entity.asset.attribute.labels.value 這個值取自 Instances.InstanceState.Code。
InstanceState.Name entity.entity.asset.deployment_status 這個值是從 Instances.InstanceState.Name 衍生而來。如果值為 running,UDM 欄位會設為 ACTIVE。如果值為 shutting-down 或 stopping,UDM 欄位會設為 PENDING_DECOMMISSION。如果值為 stopped 或 terminated,UDM 欄位會設為 DECOMMISSIONED。
InstanceType entity.entity.asset.category 這個值取自 Instances.InstanceType。
IPAddress entity.entity.asset.ip 這個值取自 Instances.IPAddress。
Ipv6Address entity.entity.asset.ip 這個值取自 Instances.Ipv6Address。
KernelID entity.entity.asset.attribute.labels.key=instances_set_kernel_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.KernelID。
KeyName entity.entity.asset.attribute.labels.key=instances_set_key_name、entity.entity.asset.attribute.labels.value 這個值取自 Instances.KeyName。
LaunchTime entity.metadata.creation_timestamp 這個值取自 Instances.LaunchTime。
LicenseSet.LicenseConfigurationArn entity.entity.resource_ancestors.name、entity.entity.resource_ancestors.resource_subtype=License Configuration Arn 這個值取自 Instances.LicenseSet.LicenseConfigurationArn。
MaintenanceOptions entity.entity.asset.attribute.labels.key=instances_set_maintenance_options_auto_recovery、entity.entity.asset.attribute.labels.value 這個值取自 Instances.MaintenanceOptions。
MetadataOptions.HTTPEndpoint entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_endpoint、entity.entity.asset.attribute.labels.value 這個值取自 Instances.MetadataOptions.HTTPEndpoint。
MetadataOptions.HTTPProtocolIpv6 entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_protocol_ipv6、entity.entity.asset.attribute.labels.value 這個值取自 Instances.MetadataOptions.HTTPProtocolIpv6。
MetadataOptions.HTTPPutResponseHopLimit entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_put_response_hop_limit、entity.entity.asset.attribute.labels.value 這個值取自 Instances.MetadataOptions.HTTPPutResponseHopLimit。
MetadataOptions.HTTPTokens entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_tokens、entity.entity.asset.attribute.labels.value 這個值取自 Instances.MetadataOptions.HTTPTokens。
MetadataOptions.InstanceMetadataTags entity.entity.asset.attribute.labels.key=instances_set_metadata_options_instance_metadata_tags、entity.entity.asset.attribute.labels.value 這個值取自 Instances.MetadataOptions.InstanceMetadataTags。
MetadataOptions.State entity.entity.asset.attribute.labels.key=instances_set_metadata_options_state、entity.entity.asset.attribute.labels.value 這個值取自 Instances.MetadataOptions.State。
Monitoring.State entity.entity.asset.attribute.labels.key=instances_set_monitoring_state、entity.entity.asset.attribute.labels.value 這個值取自 Instances.Monitoring.State。
NetworkInterfaceSet.Association.CarrierIP entity.entity.asset.nat_ip 這個值取自 Instances.NetworkInterfaceSet.Association.CarrierIP。
NetworkInterfaceSet.Association.CustomerOwnedIP entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_association_customer_owned_ip、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Association.CustomerOwnedIP。
NetworkInterfaceSet.Association.IPOwnerID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_association_ip_owner_id、entity.entity.asset.attribute.labels.value、entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_ip_addresses_set_association_ip_owner_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Association.IPOwnerID。
NetworkInterfaceSet.Association.PublicDNSName entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_association_public_dns_name、entity.entity.asset.attribute.labels.value、entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_ip_addresses_set_association_public_dns_name、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Association.PublicDNSName。
NetworkInterfaceSet.Association.PublicIP entity.entity.asset.ip 這個值取自 Instances.NetworkInterfaceSet.Association.PublicIP。
NetworkInterfaceSet.Attachment.AttachTime entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_attachment_attach_time、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Attachment.AttachTime。
NetworkInterfaceSet.Attachment.AttachmentID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_attachment_attachment_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Attachment.AttachmentID。
NetworkInterfaceSet.Attachment.DeleteOnTermination entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_attachment_delete_on_termination、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Attachment.DeleteOnTermination。
NetworkInterfaceSet.Attachment.DeviceIndex entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_attachment_device_index、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Attachment.DeviceIndex。
NetworkInterfaceSet.Attachment.NetworkCardIndex entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_attachment_network_card_index、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Attachment.NetworkCardIndex。
NetworkInterfaceSet.Attachment.Status entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_attachment_status、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Attachment.Status。
NetworkInterfaceSet.Description entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_description、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Description。
NetworkInterfaceSet.GroupSet.GroupID entity.entity.group.attribute.labels.key=instances_set_network_interface_set_group_set_group_id、entity.entity.group.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.GroupSet.GroupID。
NetworkInterfaceSet.GroupSet.GroupName entity.entity.group.attribute.labels.key=instances_set_network_interface_set_group_set_group_name、entity.entity.group.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.GroupSet.GroupName。
NetworkInterfaceSet.InterfaceType entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_interface_type、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.InterfaceType。
NetworkInterfaceSet.Ipv6AddressesSet.Ipv6Address entity.entity.asset.ip 這個值取自 Instances.NetworkInterfaceSet.Ipv6AddressesSet.Ipv6Address。
NetworkInterfaceSet.Ipv6AddressesSet.IsPrimaryIpv6 entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_ipv6_addresses_set_is_primary_ipv6、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Ipv6AddressesSet.IsPrimaryIpv6。
NetworkInterfaceSet.MacAddress entity.entity.asset.mac 這個值取自 Instances.NetworkInterfaceSet.MacAddress。
NetworkInterfaceSet.NetworkInterfaceID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_network_interface_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.NetworkInterfaceID。
NetworkInterfaceSet.OwnerID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_owner_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.OwnerID。
NetworkInterfaceSet.PrivateDNSName entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_dns_name、entity.entity.asset.attribute.labels.value、entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_ip_addresses_set_private_dns_name、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.PrivateDNSName。
NetworkInterfaceSet.PrivateIPAddress entity.entity.asset.ip 這個值取自 Instances.NetworkInterfaceSet.PrivateIPAddress。
NetworkInterfaceSet.PrivateIPAddressesSet.Primary entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_ip_addresses_set_primary、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.PrivateIPAddressesSet.Primary。
NetworkInterfaceSet.PrivateIPAddressesSet.PrivateIPAddress entity.entity.asset.ip 這個值取自 Instances.NetworkInterfaceSet.PrivateIPAddressesSet.PrivateIPAddress。
NetworkInterfaceSet.SourceDestCheck entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_source_dest_check、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.SourceDestCheck。
NetworkInterfaceSet.Status entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_status、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.Status。
NetworkInterfaceSet.SubnetID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_subnet_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.SubnetID。
NetworkInterfaceSet.VpcID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_vpc_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.NetworkInterfaceSet.VpcID。
OutpostArn entity.relations.entity.asset.product_object_id 這個值取自 Instances.OutpostArn。
Placement.Affinity entity.entity.asset.attribute.labels.key=instances_set_placement_affinity、entity.entity.asset.attribute.labels.value 這個值取自 Instances.Placement.Affinity。
Placement.AvailabilityZone entity.entity.asset.attribute.cloud.availability_zone 這個值取自 Instances.Placement.AvailabilityZone。
Placement.GroupID entity.entity.group.attribute.labels.key=instances_set_placement_group_id、entity.entity.group.attribute.labels.value 這個值取自 Instances.Placement.GroupID。
Placement.GroupName entity.entity.group.attribute.labels.key=instances_set_placement_group_name、entity.entity.group.attribute.labels.value 這個值取自 Instances.Placement.GroupName。
Placement.HostID entity.relations.entity.asset.asset_id 這個值取自 Instances.Placement.HostID。
Placement.HostResourceGroupArn entity.relations.entity.asset.attribute.labels.key=instances_set_placement_host_resource_group_arn、entity.relations.entity.asset.attribute.labels.value 這個值取自 Instances.Placement.HostResourceGroupArn。
Placement.PartitionNumber entity.entity.asset.attribute.labels.key=instances_set_placement_partition_number、entity.entity.asset.attribute.labels.value 這個值取自 Instances.Placement.PartitionNumber。
Placement.SpreadDomain entity.entity.asset.attribute.labels.key=instances_set_placement_spread_domain、entity.entity.asset.attribute.labels.value 這個值取自 Instances.Placement.SpreadDomain。
Placement.Tenancy entity.entity.asset.attribute.labels.key=instances_set_placement_tenancy、entity.entity.asset.attribute.labels.value 這個值取自 Instances.Placement.Tenancy。
PlatformDetails entity.entity.asset.attribute.labels.key=instances_set_platform_details、entity.entity.asset.attribute.labels.value 這個值取自 Instances.PlatformDetails。
PrivateDNSName entity.entity.network.dns.questions.name 這個值取自 Instances.PrivateDNSName。
PrivateDNSNameOptions.EnableResourceNameDnsAAAARecord entity.entity.network.dns.questions.type 如果值為 true,UDM 欄位會設為 28。
PrivateDNSNameOptions.EnableResourceNameDnsARecord entity.entity.network.dns.questions.type 如果值為 true,UDM 欄位會設為 1。
PrivateDNSNameOptions.HostnameType entity.entity.asset.attribute.labels.key=instances_set_private_dns_name_options_hostname_type、entity.entity.asset.attribute.labels.value 這個值取自 Instances.PrivateDNSNameOptions.HostnameType。
PrivateIPAddress entity.entity.asset.ip 這個值取自 Instances.PrivateIPAddress。
ProductCodes.ProductCode entity.entity.asset.attribute.labels.key=instances_set_product_codes_product_code、entity.entity.asset.attribute.labels.value 這個值取自 Instances.ProductCodes.ProductCode。
ProductCodes.Type entity.entity.asset.attribute.labels.key=instances_set_product_codes_type、entity.entity.asset.attribute.labels.value 這個值取自 Instances.ProductCodes.Type。
RamdiskID entity.entity.asset.attribute.labels.key=instances_set_ramdisk_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.RamdiskID。
Reason entity.entity.asset.attribute.labels.key=instances_set_reason、entity.entity.asset.attribute.labels.value 這個值取自 Instances.Reason。
ReservationID entity.additional.fields.key=reservation_id、entity.additional.fields.value.string_value 這個值取自 ReservationID。
RequesterID entity.additional.fields.key=requester_id、entity.additional.fields.value.string_value 這個值取自 RequesterID。
RootDeviceName entity.entity.asset.attribute.labels.key=instances_set_root_device_name、entity.entity.asset.attribute.labels.value 這個值取自 Instances.RootDeviceName。
RootDeviceType entity.entity.asset.attribute.labels.key=instances_set_root_device_type、entity.entity.asset.attribute.labels.value 這個值取自 Instances.RootDeviceType。
SourceDestCheck entity.entity.asset.attribute.labels.key=instances_set_source_dest_check、entity.entity.asset.attribute.labels.value 這個值取自 Instances.SourceDestCheck。
SpotInstanceRequestID entity.entity.asset.attribute.labels.key=instances_set_spot_instance_request_id、entity.entity.asset.attribute.labels.value 這個值取自 Instances.SpotInstanceRequestID。
SriovNetSupport entity.entity.asset.attribute.labels.key=instances_set_sriov_net_support、entity.entity.asset.attribute.labels.value 這個值取自 Instances.SriovNetSupport。
StateReason entity.entity.asset.attribute.labels.key=instances_set_state_reason_code、entity.entity.asset.attribute.labels.value 這個值取自 Instances.StateReason。
StateReason.Code entity.entity.asset.attribute.labels.key=instances_set_state_reason_code、entity.entity.asset.attribute.labels.value 這個值取自 Instances.StateReason.Code。
StateReason.Message entity.entity.asset.attribute.labels.key=instances_set_state_reason_message、entity.entity.asset.attribute.labels.value 這個值取自 Instances.StateReason.Message。
SubnetID entity.entity.resource_ancestors.product_object_id、entity.entity.resource_ancestors.resource_type=SUBNET 這個值取自 Instances.SubnetID。
TagSet.Key entity.entity.asset.attribute.labels.key 這個值取自 Instances.TagSet.Key。
TagSet.Value entity.entity.asset.attribute.labels.value 這個值取自 Instances.TagSet.Value。
TpmSupport entity.entity.asset.attribute.labels.key=instances_set_tpm_support、entity.entity.asset.attribute.labels.value 這個值取自 Instances.TpmSupport。
UsageOperation entity.entity.asset.attribute.labels.key=instances_set_usage_operation、entity.entity.asset.attribute.labels.value 這個值取自 Instances.UsageOperation。
UsageOperationUpdateTime entity.entity.asset.attribute.labels.key=instances_set_usage_operation_update_time、entity.entity.asset.attribute.labels.value 這個值取自 Instances.UsageOperationUpdateTime。
VirtualizationType entity.entity.asset.attribute.labels.key=instances_set_virtualization_type、entity.entity.asset.attribute.labels.value 這個值取自 Instances.VirtualizationType。
VpcID entity.entity.resource_ancestors.product_object_id、entity.entity.resource_ancestors.resource_type=VPC_NETWORK 這個值取自 Instances.VpcID。
collection_time entity.metadata.collected_timestamp 這個值直接取自原始記錄中的 collection_time 欄位。硬式編碼為 AMAZON_WEB_SERVICES。IMAGE、VOLUME、SUBNET、VPC_NETWORK、執行個體設定檔 ARN、容量預留 ARN、彈性介面加速器 ARN 和授權設定 ARN 資源類型,硬式編碼為 AMAZON_WEB_SERVICES。硬式編碼為 SERVER。硬式編碼為 Amazon EC2。硬式編碼為 AWS。如果 Instances.Placement.HostID 存在且不為空白,則硬式編碼為 ASSET。如果 Instances.Placement.HostID 存在且不為空白,則硬式編碼為 EXECUTES。硬式編碼為 ASSET。

變更記錄

查看這個剖析器的變更記錄

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求解答。