收集 AWS EC2 实例日志
本文档介绍了如何将 AWS EC2 实例日志配置到 Google Security Operations 以进行监控和分析。解析器会从实例预订 JSON 日志中提取数据,重构和重命名字段以符合 UDM,处理各种数据类型和嵌套结构(包括网络接口、组和标记),同时生成资产关系和元数据。它还会执行错误处理并丢弃格式错误的 JSON 消息。
准备工作
- 确保您拥有 Google SecOps 实例。
- 确保您拥有对 AWS 的特权访问权限。
配置 AWS IAM 和 S3
- 按照此用户指南中的说明创建 Amazon S3 存储分区:创建存储分区。
- 保存存储分区的名称和区域,以备日后使用。
- 按照此用户指南中的说明创建用户:创建 IAM 用户。
- 选择创建的用户。
- 选择安全凭据标签页。
- 点击访问密钥部分中的创建访问密钥。
- 选择第三方服务作为用例。
- 点击下一步。
- 可选:添加说明标记。
- 点击创建访问密钥。
- 点击下载 CSV 文件,保存访问密钥和密钥以供日后使用。
- 点击完成。
- 选择权限标签页。
- 在权限政策部分中,点击添加权限。
- 选择添加权限。
- 选择直接附加政策
- 搜索并选择 AmazonS3FullAccess 政策。
- 点击下一步。
- 点击添加权限。
配置 EC2 以将日志发送到 CloudWatch Logs
使用 SSH 连接到您的 EC2 实例,并提供密钥对以进行身份验证。
ssh -i your-key.pem ec2-user@your-ec2-public-ip
安装 CloudWatch Logs 代理:
- 如需在 Amazon Linux 上安装 CloudWatch Logs 代理,请使用以下命令:
sudo yum install -y awslogs
- 如需在 Ubuntu 上安装 CloudWatch Logs 代理,请使用以下命令:
sudo apt-get install -y awslogs
打开 CloudWatch Logs 配置文件:
sudo vi /etc/awslogs/awslogs.conf
创建一个脚本,用于提取此日志实例元数据并将其写入文件:
#!/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
将脚本另存为
/etc/init.d/metadata_script.sh
,并使用 crontab 或rc.local
在实例启动时运行该脚本。打开 CloudWatch Logs 代理的配置文件:
sudo vi /etc/awslogs/awslogs.conf
将以下内容添加到配置文件中:
[/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}
保存配置并退出编辑器。
启动 CloudWatch Logs 代理:
- 在 Amazon Linux 上:
sudo service awslogs start
- 在 Ubuntu 上:
sudo service awslogs start
验证代理是否正在运行:
sudo service awslogs status
为 Lambda 和 S3 配置 IAM 权限
在 AWS IAM 控制台中,创建一个具有以下权限的新 IAM 角色:
logs:PutSubscriptionFilter
logs:DescribeLogGroups
logs:GetLogEvents
s3:PutObject
将此角色附加到将日志导出到 S3 的 Lambda 函数。
配置 Lambda 以将日志导出到 S3
前往 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 存储分区的实际名称。
- 将
将 IAM 角色附加到之前创建的 Lambda 函数。
在 CloudWatch 控制台中,前往“日志”部分。
选择日志组;例如
/ec2/system/logs
。依次点击操作 > 创建订阅过滤条件。
将目标位置设置为之前创建的 Lambda 函数。
在 Google SecOps 中配置 Feed 以提取 AWS EC2 实例日志
- 依次前往 SIEM 设置 > Feed。
- 点击新增。
- 在 Feed 名称字段中,输入 Feed 的名称;例如,AWS EC2 实例日志。
- 选择 Amazon S3 作为来源类型。
- 选择 AWS EC2 实例作为日志类型。
- 点击下一步。
为以下输入参数指定值:
- 区域:Amazon S3 存储分区所在的区域。
- S3 URI:存储分区 URI。
s3://your-log-bucket-name/
- 将
your-log-bucket-name
替换为存储分区的实际名称。
- 将
- URI 是:选择目录或包含子目录的目录。
来源删除选项:根据您的偏好选择删除选项。
访问密钥 ID:有权访问 S3 存储分区的用户访问密钥。
私有访问密钥:有权访问 S3 存储分区的用户私钥。
资源命名空间:资源命名空间。
提取标签:要应用于此 Feed 中的事件的标签。
点击下一步。
在最终确定界面中查看新的 Feed 配置,然后点击提交。
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、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 专业人士寻求解答。