• /
  • ログイン

Amazon VPC Flow Logs monitoring integration

Amazon's Enhanced AWS VPC Flow Logs enables you to capture information about the IP traffic going to and from network interfaces in your VPC. The VPC Flow Logs integration with New Relic allows you to parse all network logs generated by the private networks in order to monitor accepted/rejected traffic in public IPs and inside the VPC itself.

重要

The New Relic VPC Flow Logs integration can only process logs in AWS's default format. For more information on VPC Flow Logs formatting, see Amazon's VPC Flow Logs documentation.

Requirements

重要

If you integrated an AWS account both through the Metric streams and API Polling mode, you can only see the VPC logs in the provider account using the Metric streams integration.

For the VPC logs to send data to New Relic, you must enable a Lambda function provided by New Relic that will perform the ingestion work. Unlike other AWS integrations that have polling intervals, the VPC Flow Logs integration receives data when it is sent to the Lambda function. The push rate of VPC Flow log data is 15 seconds.

Enable VPC Flow Logs monitoring

In order to send data to the New Relic ingest service, New Relic provides a specific Lambda function that supports pushes from CloudWatch logs and fetches data from S3 buckets. To assign the Lambda function and enable VPC Flow Logs monitoring:

  1. Create a new AWS Lambda function: Select Lambda > Functions > AWS Serverless Application Repository, enable the Show apps that create custom IAM roles or resource policies option, and use the application called NewRelic-log-ingestion.
  2. (Optional) Introduce your New Relic account license key, which is used to populate the LICENSE_KEY environment variable.
  3. Select Deploy to create a new CloudFormation stack, a new function called newrelic-log-ingestion, and the required role.
  4. Go to newrelic-log-ingestion function. If you haven't already introduced your New Relic account license key, add it now to the LICENSE_KEY environment variable.
  5. Continue with the procedure to stream logs to the Lambda function.

Make sure that the NewRelic-log-ingestion function execution role has attached the arn:aws:iam::aws:policy/CloudWatchLogsReadOnlyAccess policy, so it has the appropriate permissions to read CloudWatch Logs.

Stream logs to Lambda function

To stream logs to the Lambda function:

  1. From the CloudWatch Management Console, select Logs.
  2. Select /aws/vpc/flow-logs and click Actions > Stream to AWS Lambda.
  3. Select the New Relic Lambda function you created (newrelic-log-ingestion) when you enabled VPC Flow Logs monitoring, then select Next.
  4. Keep the default Log format (Amazon VPC Flow Logs) and select Next.
  5. Review the configuration, then select Start streaming.

Configure traffic logs

You can configure traffic logs from within AWS in three modes:

Type

Description

Accepted traffic

Logs will only capture traffic in the right

Rejected traffic

Logs will only reflect rejected traffic

All traffic

Logs will show both accepted and rejected traffic

Polling frequency

Unlike other AWS integrations that have polling intervals, the VPC Flow Logs integration receives data when it is sent to the Lambda function. The push rate of VPC Flow log data is 15 seconds.

Amazon VPC Flow Logs data processed

New Relic collects only these log fields from the Amazon VPC Flow Log records.

Field

Description

version

The VPC Flow Logs version.

account-id

The AWS account ID for the flow log.

interface-id

The ID of the network interface for which the log stream applies.

srcaddr

The source IPv4 or IPv6 address. The IPv4 address of the network interface is always its private IPv4 address.

dstaddr

The destination IPv4 or IPv6 address. The IPv4 address of the network interface is always its private IPv4 address.

srcport

The source port of the traffic.

dstport

The destination port of the traffic.

protocol

The IANA protocol number of the traffic. For more information, go to Assigned Internet Protocol Numbers.

packets

The number of packets transferred during the capture window.

bytes

The number of bytes transferred during the capture window.

start

The time, in Unix seconds, of the start of the capture window.

end

The time, in Unix seconds, of the end of the capture window.

action

The action associated with the traffic:

  • ACCEPT: The recorded traffic was permitted by the security groups or network ACLs.
  • REJECT: The recorded traffic was not permitted by the security groups or network ACLs.

log-status

The logging status of the flow log:

  • OK: Data is logging normally to CloudWatch Logs.
  • NODATA: There was no network traffic to or from the network interface during the capture window.
  • SKIPDATA: Some flow log records were skipped during the capture window. This may be because of an internal capacity constraint, or an internal error.

VPC Flow Log metrics

New Relic processes these traffic metrics:

Metrics

Description

provider.bytes

The number of bytes.

provider.packets

The number of packets.

VPC Flow Log dimensions

New Relic allows you to slice and dice metrics for accepted or rejected traffic using these dimensions:

Dimensions

Definition

provider.action

If the packet was accepted or rejected

provider.destinationAddress

Destination IP address

provider.destinationPort

The destination port

provider.interfaceId

The network interface ID where the packet is registered

provider.privateDnsName

The private DNS name

provider.privateIp

The private IP

provider.protocol

The internet protocol number

provider.publicDnsName

The public DNS name

provider.publicIp

The public IP

provider.requesterManaged

Indicator that the network interface was created by the user or by AWS

provider.sourceAddress

The source IP address

provider.sourcePort

The source port

provider.subnetId

The subnet ID

provider.vpcId

The VPC ID where the network interface belongs

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.