Enter a Sink name and Sink description, then click Next.
Under Select sink service, select Cloud Pub/Sub topic, and select the Pub/Sub topic you previously created.
Configure remaining filters as needed, then click Create sink to complete setup.
Use Dataflow job
To send your GCP logs to New Relic using a Dataflow job, you will use our Dataflow template. Before you begin, make sure you have the following tools on your local computer:
The Google Cloud SDK, which includes gcloud and gsutil command line tools
Run the following command and follow the prompts to log into GCP and select your cloud project:
bash
$
gcloud init
Using the wizard, you will select a cloud project to use, and you will be able to optionally select a default compute region and zone for the resources you create using gcloud or gsutil. We will not presume a default project, location or region for the following commands.
Clone the DataflowTemplates GitHub repository using the following command:
Then continue with the next section to execute additional commands.
To set the required configuration to compile and run the Dataflow forwarder, run the following commands in your DataflowTemplates directory. The only required values are:
PROJECT_ID
BUCKET_NAME
NR_LICENSE_KEY
INPUT_SUBSCRIPTION_NAME
You can leave the other default values as is.
# The Google Cloud Platform project id where your logs are and where the Dataflow log forwarder will run
PROJECT_ID=<your_project_id>
# Temporary bucket that will store intermediary files as a result of compiling the Dataflow template. Its name must be unique.
New Relic's URL for the Log API. This routes from the VPC where the Dataflow pipeline runs.
Default:
https://log-api.newrelic.com/log/v1
Europe region:
https://log-api.eu.newrelic.com/log/v1
batchCount
Maximum number of log records to aggregate into a batch before sending them to New Relic in a single HTTP POST request.
Default: 100
flushDelay
Number of seconds to wait for additional logs (up to batchCount) since the reception of the last log record in non-full batch, before flushing them to New Relic.
Default: 2
parallelism
Maximum number of parallel requests.
Default: 1
disableCertificateValidation
Disable SSL certificate validation.
Default: false
useCompression
Compress (in GZIP) the payloads sent to New Relic's Logs API.
Default: true
tokenKMSEncryptionKey
KMS Encryption Key for the token. Use this format:
To disable log forwarding capabilities, follow standard procedures in Google Cloud Platform documentation. You do not need to do anything else in New Relic.