收集 AWS EC2 实例日志

支持的平台:

本文档介绍了如何将 AWS EC2 实例日志配置到 Google Security Operations 以进行监控和分析。解析器会从实例预订 JSON 日志中提取数据,重构和重命名字段以符合 UDM,处理各种数据类型和嵌套结构(包括网络接口、组和标记),同时生成资产关系和元数据。它还会执行错误处理并丢弃格式错误的 JSON 消息。

准备工作

  • 确保您拥有 Google SecOps 实例。
  • 确保您拥有对 AWS 的特权访问权限。

配置 AWS IAM 和 S3

  1. 按照此用户指南中的说明创建 Amazon S3 存储分区创建存储分区
  2. 保存存储分区的名称区域,以备日后使用。
  3. 按照此用户指南中的说明创建用户:创建 IAM 用户
  4. 选择创建的用户
  5. 选择安全凭据标签页。
  6. 点击访问密钥部分中的创建访问密钥
  7. 选择第三方服务作为用例
  8. 点击下一步
  9. 可选:添加说明标记。
  10. 点击创建访问密钥
  11. 点击下载 CSV 文件,保存访问密钥密钥以供日后使用。
  12. 点击完成
  13. 选择权限标签页。
  14. 权限政策部分中,点击添加权限
  15. 选择添加权限
  16. 选择直接附加政策
  17. 搜索并选择 AmazonS3FullAccess 政策。
  18. 点击下一步
  19. 点击添加权限

配置 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,并使用 crontabrc.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 存储分区的实际名称。
  2. 将 IAM 角色附加到之前创建的 Lambda 函数。

  3. CloudWatch 控制台中,前往“日志”部分

  4. 选择日志组;例如 /ec2/system/logs

  5. 依次点击操作 > 创建订阅过滤条件

  6. 目标位置设置为之前创建的 Lambda 函数

在 Google SecOps 中配置 Feed 以提取 AWS EC2 实例日志

  1. 依次前往 SIEM 设置 > Feed
  2. 点击新增
  3. Feed 名称字段中,输入 Feed 的名称;例如,AWS EC2 实例日志
  4. 选择 Amazon S3 作为来源类型
  5. 选择 AWS EC2 实例作为日志类型
  6. 点击下一步
  7. 为以下输入参数指定值:

    • 区域:Amazon S3 存储分区所在的区域。
    • S3 URI:存储分区 URI。
      • s3://your-log-bucket-name/
        • your-log-bucket-name 替换为存储分区的实际名称。
    • URI 是:选择目录包含子目录的目录
    • 来源删除选项:根据您的偏好选择删除选项。

    • 访问密钥 ID:有权访问 S3 存储分区的用户访问密钥。

    • 私有访问密钥:有权访问 S3 存储分区的用户私钥。

    • 资源命名空间资源命名空间

    • 提取标签:要应用于此 Feed 中的事件的标签。

  8. 点击下一步

  9. 最终确定界面中查看新的 Feed 配置,然后点击提交

UDM 映射表

日志字段 UDM 映射 逻辑
Architecture entity.entity.asset.attribute.labels.key=instances_set_architectureentity.entity.asset.attribute.labels.value 该值直接取自原始日志中的 Instances.Architecture 字段。
AmiLaunchIndex entity.entity.asset.attribute.labels.key=instances_set_ami_launch_indexentity.entity.asset.attribute.labels.value 该值直接取自原始日志中的 Instances.AmiLaunchIndex 字段。
BlockDeviceMapping.Ebs.AttachTime entity.entity.resource_ancestors.attribute.labels.key=instances_set_block_device_mapping_ebs_attach_timeentity.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_terminationentity.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_statusentity.entity.resource_ancestors.attribute.labels.value 此值取自 Instances.BlockDeviceMapping.Ebs.Status
BlockDeviceMapping.Ebs.VolumeID entity.entity.resource_ancestors.product_object_identity.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_nameentity.entity.resource_ancestors.attribute.labels.value 该值取自 Instances.BlockDeviceMapping.Name
BootMode entity.entity.asset.attribute.labels.key=instances_set_boot_modeentity.entity.asset.attribute.labels.value 该值取自 Instances.BootMode
CapacityReservationID entity.entity.asset.attribute.labels.key=instances_set_capacity_reservation_identity.entity.asset.attribute.labels.value 该值取自 Instances.CapacityReservationID
CapacityReservationSpecification.CapacityReservationPreference entity.entity.asset.attribute.labels.key=instances_set_capacity_reservation_specification_capacity_reservation_preferenceentity.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_identity.entity.asset.attribute.labels.value 此值取自 Instances.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationID
CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupArn entity.entity.resource_ancestors.nameentity.entity.resource_ancestors.resource_subtype=Capacity Reservation Arn 此值取自 Instances.CapacityReservationSpecification.CapacityReservationTarget.CapacityReservationResourceGroupArn
ClientToken entity.entity.asset.attribute.labels.key=instances_set_client_tokenentity.entity.asset.attribute.labels.value 该值取自 Instances.ClientToken
CPU.AmdSevSnp entity.entity.asset.attribute.labels.key=instances_set_cpu_options_amd_sev_snpentity.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_coreentity.entity.asset.attribute.labels.value 该值取自 Instances.CPU.ThreadsPerCore
CurrentInstanceBootMode entity.entity.asset.attribute.labels.key=instances_set_current_instance_boot_modeentity.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_optimizedentity.entity.asset.attribute.labels.value 该值取自 Instances.EbsOptimized
ElasticGpuAssociationSet.ElasticGpuAssociationID entity.entity.asset.attribute.labels.key=instances_set_elastic_gpu_association_set_elastic_gpu_association_identity.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_stateentity.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_timeentity.entity.asset.attribute.labels.value 此值取自 Instances.ElasticGpuAssociationSet.ElasticGpuAssociationTime
ElasticGpuAssociationSet.ElasticGpuID entity.entity.asset.attribute.labels.key=instances_set_elastic_gpu_association_set_elastic_gpu_identity.entity.asset.attribute.labels.value 该值取自 Instances.ElasticGpuAssociationSet.ElasticGpuID
ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorArn entity.entity.resource_ancestors.nameentity.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_identity.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_stateentity.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_timeentity.entity.resource_ancestors.attribute.labels.value 该值取自 Instances.ElasticInferenceAcceleratorAssociationSet.ElasticInferenceAcceleratorAssociationTime
EnaSupport entity.entity.asset.attribute.labels.key=instances_set_ena_supportentity.entity.asset.attribute.labels.value 该值取自 Instances.EnaSupport
EnclaveOptions.Enabled entity.entity.asset.attribute.labels.key=instances_set_enclave_options_enabledentity.entity.asset.attribute.labels.value 该值取自 Instances.EnclaveOptions.Enabled
GroupSet.GroupID entity.entity.group.product_object_identity.entity.group.attribute.labels.key=group_set_group_identity.entity.group.attribute.labels.valueentity.entity.group.attribute.labels.key=instances_set_group_set_group_identity.entity.group.attribute.labels.valueentity.entity.group.attribute.labels.key=instances_set_network_interface_set_group_set_group_identity.entity.group.attribute.labels.value 该值取自 GroupSet.GroupID。数组中的第一个 GroupID 会映射到 entity.entity.group.product_object_id。后续的 GroupID 值会映射为标签。
GroupSet.GroupName entity.entity.group.group_display_nameentity.entity.group.attribute.labels.key=group_set_group_nameentity.entity.group.attribute.labels.valueentity.entity.group.attribute.labels.key=instances_set_group_set_group_nameentity.entity.group.attribute.labels.valueentity.entity.group.attribute.labels.key=instances_set_network_interface_set_group_set_group_nameentity.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_optionsentity.entity.asset.attribute.labels.value 该值取自 Instances.HibernationOptions
HibernationOptions.Configured entity.entity.asset.attribute.labels.key=instances_set_hibernation_options_configuredentity.entity.asset.attribute.labels.value 该值取自 Instances.HibernationOptions.Configured
Hypervisor entity.entity.asset.attribute.labels.key=instances_set_hypervisorentity.entity.asset.attribute.labels.value 此值取自 Instances.Hypervisor
IamInstanceProfile.Arn entity.entity.resource_ancestors.nameentity.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_identity.entity.resource_ancestors.resource_type=IMAGE 此值取自 Instances.ImageID
InstanceID entity.metadata.product_entity_identity.entity.asset.asset_id 该值取自 Instances.InstanceID
InstanceLifecycle entity.entity.asset.attribute.labels.key=instances_set_instance_lifecycleentity.entity.asset.attribute.labels.value 此值取自 Instances.InstanceLifecycle
InstanceState.Code entity.entity.asset.attribute.labels.key=instances_set_instance_state_codeentity.entity.asset.attribute.labels.value 该值取自 Instances.InstanceState.Code
InstanceState.Name entity.entity.asset.deployment_status 该值派生自 Instances.InstanceState.Name。如果值为 running,则 UDM 字段设置为 ACTIVE。如果值为 shutting-downstopping,则 UDM 字段会设置为 PENDING_DECOMMISSION。如果值为 stoppedterminated,则 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_identity.entity.asset.attribute.labels.value 此值取自 Instances.KernelID
KeyName entity.entity.asset.attribute.labels.key=instances_set_key_nameentity.entity.asset.attribute.labels.value 该值取自 Instances.KeyName
LaunchTime entity.metadata.creation_timestamp 此值取自 Instances.LaunchTime
LicenseSet.LicenseConfigurationArn entity.entity.resource_ancestors.nameentity.entity.resource_ancestors.resource_subtype=License Configuration Arn 该值取自 Instances.LicenseSet.LicenseConfigurationArn
MaintenanceOptions entity.entity.asset.attribute.labels.key=instances_set_maintenance_options_auto_recoveryentity.entity.asset.attribute.labels.value 该值取自 Instances.MaintenanceOptions
MetadataOptions.HTTPEndpoint entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_endpointentity.entity.asset.attribute.labels.value 此值取自 Instances.MetadataOptions.HTTPEndpoint
MetadataOptions.HTTPProtocolIpv6 entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_protocol_ipv6entity.entity.asset.attribute.labels.value 该值取自 Instances.MetadataOptions.HTTPProtocolIpv6
MetadataOptions.HTTPPutResponseHopLimit entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_put_response_hop_limitentity.entity.asset.attribute.labels.value 此值取自 Instances.MetadataOptions.HTTPPutResponseHopLimit
MetadataOptions.HTTPTokens entity.entity.asset.attribute.labels.key=instances_set_metadata_options_http_tokensentity.entity.asset.attribute.labels.value 此值取自 Instances.MetadataOptions.HTTPTokens
MetadataOptions.InstanceMetadataTags entity.entity.asset.attribute.labels.key=instances_set_metadata_options_instance_metadata_tagsentity.entity.asset.attribute.labels.value 此值取自 Instances.MetadataOptions.InstanceMetadataTags
MetadataOptions.State entity.entity.asset.attribute.labels.key=instances_set_metadata_options_stateentity.entity.asset.attribute.labels.value 此值取自 Instances.MetadataOptions.State
Monitoring.State entity.entity.asset.attribute.labels.key=instances_set_monitoring_stateentity.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_ipentity.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_identity.entity.asset.attribute.labels.valueentity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_ip_addresses_set_association_ip_owner_identity.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_nameentity.entity.asset.attribute.labels.valueentity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_ip_addresses_set_association_public_dns_nameentity.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_timeentity.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_identity.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_terminationentity.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_indexentity.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_indexentity.entity.asset.attribute.labels.value 此值取自 Instances.NetworkInterfaceSet.Attachment.NetworkCardIndex
NetworkInterfaceSet.Attachment.Status entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_attachment_statusentity.entity.asset.attribute.labels.value 该值取自 Instances.NetworkInterfaceSet.Attachment.Status
NetworkInterfaceSet.Description entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_descriptionentity.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_identity.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_nameentity.entity.group.attribute.labels.value 此值取自 Instances.NetworkInterfaceSet.GroupSet.GroupName
NetworkInterfaceSet.InterfaceType entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_interface_typeentity.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_ipv6entity.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_identity.entity.asset.attribute.labels.value 该值取自 Instances.NetworkInterfaceSet.NetworkInterfaceID
NetworkInterfaceSet.OwnerID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_owner_identity.entity.asset.attribute.labels.value 该值取自 Instances.NetworkInterfaceSet.OwnerID
NetworkInterfaceSet.PrivateDNSName entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_dns_nameentity.entity.asset.attribute.labels.valueentity.entity.asset.attribute.labels.key=instances_set_network_interface_set_private_ip_addresses_set_private_dns_nameentity.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_primaryentity.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_checkentity.entity.asset.attribute.labels.value 该值取自 Instances.NetworkInterfaceSet.SourceDestCheck
NetworkInterfaceSet.Status entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_statusentity.entity.asset.attribute.labels.value 该值取自 Instances.NetworkInterfaceSet.Status
NetworkInterfaceSet.SubnetID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_subnet_identity.entity.asset.attribute.labels.value 此值取自 Instances.NetworkInterfaceSet.SubnetID
NetworkInterfaceSet.VpcID entity.entity.asset.attribute.labels.key=instances_set_network_interface_set_vpc_identity.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_affinityentity.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_identity.entity.group.attribute.labels.value 该值取自 Instances.Placement.GroupID
Placement.GroupName entity.entity.group.attribute.labels.key=instances_set_placement_group_nameentity.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_arnentity.relations.entity.asset.attribute.labels.value 该值取自 Instances.Placement.HostResourceGroupArn
Placement.PartitionNumber entity.entity.asset.attribute.labels.key=instances_set_placement_partition_numberentity.entity.asset.attribute.labels.value 该值取自 Instances.Placement.PartitionNumber
Placement.SpreadDomain entity.entity.asset.attribute.labels.key=instances_set_placement_spread_domainentity.entity.asset.attribute.labels.value 该值取自 Instances.Placement.SpreadDomain
Placement.Tenancy entity.entity.asset.attribute.labels.key=instances_set_placement_tenancyentity.entity.asset.attribute.labels.value 该值取自 Instances.Placement.Tenancy
PlatformDetails entity.entity.asset.attribute.labels.key=instances_set_platform_detailsentity.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_typeentity.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_codeentity.entity.asset.attribute.labels.value 此值取自 Instances.ProductCodes.ProductCode
ProductCodes.Type entity.entity.asset.attribute.labels.key=instances_set_product_codes_typeentity.entity.asset.attribute.labels.value 此值取自 Instances.ProductCodes.Type
RamdiskID entity.entity.asset.attribute.labels.key=instances_set_ramdisk_identity.entity.asset.attribute.labels.value 该值取自 Instances.RamdiskID
Reason entity.entity.asset.attribute.labels.key=instances_set_reasonentity.entity.asset.attribute.labels.value 该值取自 Instances.Reason
ReservationID entity.additional.fields.key=reservation_identity.additional.fields.value.string_value 该值取自 ReservationID
RequesterID entity.additional.fields.key=requester_identity.additional.fields.value.string_value 该值取自 RequesterID
RootDeviceName entity.entity.asset.attribute.labels.key=instances_set_root_device_nameentity.entity.asset.attribute.labels.value 此值取自 Instances.RootDeviceName
RootDeviceType entity.entity.asset.attribute.labels.key=instances_set_root_device_typeentity.entity.asset.attribute.labels.value 该值取自 Instances.RootDeviceType
SourceDestCheck entity.entity.asset.attribute.labels.key=instances_set_source_dest_checkentity.entity.asset.attribute.labels.value 此值取自 Instances.SourceDestCheck
SpotInstanceRequestID entity.entity.asset.attribute.labels.key=instances_set_spot_instance_request_identity.entity.asset.attribute.labels.value 该值取自 Instances.SpotInstanceRequestID
SriovNetSupport entity.entity.asset.attribute.labels.key=instances_set_sriov_net_supportentity.entity.asset.attribute.labels.value 此值取自 Instances.SriovNetSupport
StateReason entity.entity.asset.attribute.labels.key=instances_set_state_reason_codeentity.entity.asset.attribute.labels.value 此值取自 Instances.StateReason
StateReason.Code entity.entity.asset.attribute.labels.key=instances_set_state_reason_codeentity.entity.asset.attribute.labels.value 此值取自 Instances.StateReason.Code
StateReason.Message entity.entity.asset.attribute.labels.key=instances_set_state_reason_messageentity.entity.asset.attribute.labels.value 该值取自 Instances.StateReason.Message
SubnetID entity.entity.resource_ancestors.product_object_identity.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_supportentity.entity.asset.attribute.labels.value 该值取自 Instances.TpmSupport
UsageOperation entity.entity.asset.attribute.labels.key=instances_set_usage_operationentity.entity.asset.attribute.labels.value 该值取自 Instances.UsageOperation
UsageOperationUpdateTime entity.entity.asset.attribute.labels.key=instances_set_usage_operation_update_timeentity.entity.asset.attribute.labels.value 该值取自 Instances.UsageOperationUpdateTime
VirtualizationType entity.entity.asset.attribute.labels.key=instances_set_virtualization_typeentity.entity.asset.attribute.labels.value 该值取自 Instances.VirtualizationType
VpcID entity.entity.resource_ancestors.product_object_identity.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、Instance Profile Arn、容量预留 Arn、Elastic Interface Accelerator Arn 和 License Configuration Arn 资源类型,已硬编码为 AMAZON_WEB_SERVICES。已硬编码为 SERVER。已硬编码为 Amazon EC2。已硬编码为 AWS。如果 Instances.Placement.HostID 存在且不为空,则硬编码为 ASSET。如果 Instances.Placement.HostID 存在且不为空,则硬编码为 EXECUTES。硬编码为 ASSET。

变化

2024-01-31

  • 添加了对新架构的支持。

2023-12-14

  • 新创建的解析器。

需要更多帮助?向社区成员和 Google SecOps 专业人士寻求解答。