New Relic

Overview

Once you've set up your Firehose, connecting it to New Relic is as easy as configuring a downstream http_endpoint destination and backup s3_configuration in Terraform.

πŸ“˜

This example assumes that you've already configured the AWS Kinesis Firehose connector and addon, and included them in your Sym environment.

Example

# Firehose connector
module "kinesis_firehose_connector" {
  source  = "terraform.symops.com/symopsio/kinesis-firehose-connector/sym"

  environment = "prod"
  tags        = {
    "SymEnv" = "prod"
  }
}

resource "aws_kinesis_firehose_delivery_stream" "new_relic" {
  name = "name-of-the-stream"
  destination = "http_endpoint"

  # New Relic destination via HTTP
  http_endpoint_configuration {
    url                = "https://aws-api.newrelic.com/firehose/v1"
    name               = "New Relic"
    access_key         = aws_secretsmanager_secret.new_relic.arn
    buffering_size     = 15 # MiB
    buffering_interval = 600 # Seconds
    role_arn           = module.kinesis_firehose_connector.firehose_role_arn
    s3_backup_mode     = "FailedDataOnly"

    request_configuration {
      content_encoding = "GZIP"

      common_attributes {
        name  = "testname"
        value = "testvalue"
      }

    }
  }
    # Backup S3 configuration
  s3_configuration {
    role_arn = module.kinesis_firehose_connector.firehose_role_arn
    bucket_arn = module.kinesis_firehose_connector.firehose_bucket_arn
    buffer_size        = 10
    buffer_interval    = 60
    compression_format = "GZIP"
  }

  tags        = {
    "SymEnv" = "prod"
  }
}

Did this page help you?