> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryprofound.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Akamai Datastream2 Integration

> This documentation explains how to set up Akamai Datastream2 to forward your CDN logs to the Profound Agent Analytics platform.

## Overview

The integration uses Akamai Datastream2 to forward your CDN logs to our Agent Analytics API. Akamai Datastream2 is a service that enables reliable delivery of streaming data to various destinations including HTTP endpoints. For more information about Akamai Datastream2, [visit the Akamai documentation](https://techdocs.akamai.com/datastream2/docs/welcome-datastream2).

## Prerequisites

* An Akamai account with Datastream2 add-on

* Access to your Akamai Datastream2 configuration

* A Profound Log Ingestion Token for Agent Analytics

## Configuration

<img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/akamai_setup.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=d70903421c141d21d2f4beb6cb900afc" alt="Akamai Detected" width="3680" height="2390" data-path="images/agent-analytics/akamai/akamai_setup.png" />

<Steps>
  <Step title="Step 1">
    Sign in to Akamai Control Center and navigate to [DataStream](https://control.akamai.com/apps/data-stream-ui/#/streams/group/all) in the left sidebar. Click `Create a stream`

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/create_a_stream.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=14c3af737e62235af30ed3f7db30cb07" alt="DataStream create stream Navigation" width="3680" height="2382" data-path="images/agent-analytics/akamai/create_a_stream.png" />
  </Step>

  <Step title="Step 2">
    Select your property and click `Next`

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/datastream_start.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=2486ffc50acbe122039bc01bdb64076a" alt="DataStream property selection" width="3680" height="2382" data-path="images/agent-analytics/akamai/datastream_start.png" />
  </Step>

  <Step title="Step 3">
    Select the following options in each section:

    **Log Information**

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/log_data.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=4d71519f3395e9515b691d54839133cd" alt="log information" width="456" height="478" data-path="images/agent-analytics/akamai/log_data.png" />

    **Message Exchange Data**

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/message_data.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=fbe0bc758691c5aaa77de1fc6404c5b8" alt="message data" width="1160" height="496" data-path="images/agent-analytics/akamai/message_data.png" />

    **Request Header Data**

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/header_data.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=16bfab22e601431817b5d61acfb24f7d" alt="request header data" width="478" height="574" data-path="images/agent-analytics/akamai/header_data.png" />

    **Network Data**

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/network.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=28c02304416dfd93365626ce8cfa3f28" alt="network data" width="762" height="496" data-path="images/agent-analytics/akamai/network.png" />

    **Log Format**

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/log_format.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=76d889d5b9ed3dc9c59b435fe7428019" alt="log format" width="2960" height="486" data-path="images/agent-analytics/akamai/log_format.png" />

    Read more about these fields in the [Akamai documentation](https://techdocs.akamai.com/datastream2/docs/data-set-parameters)
  </Step>

  <Step title="Step 4">
    Add authentication information:

    * From the **Destination** dropdown, select **Custom HTTPS**.

    * Select **BASIC** as the **Authentication** type.

    * Enter `https://artemis.api.tryprofound.com/v1/logs/akamai` as the **URL**.

    * Enter your organization name in the **Username** field.

    * Enter your Log Ingestion Token in the **Password** field.

    * Check **Send compressed data**.

          <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/authentication.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=fd8855bdeebf8f995ba954a7ebe86a33" alt="authentication" width="910" height="1072" data-path="images/agent-analytics/akamai/authentication.png" />
  </Step>

  <Step title="Step 5">
    Select **JSON** as the **Log format**.

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/log_format.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=76d889d5b9ed3dc9c59b435fe7428019" alt="output format" width="2960" height="486" data-path="images/agent-analytics/akamai/log_format.png" />
  </Step>

  <Step title="Step 6">
    Choose **30** seconds as the push frequency.

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/frequency.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=92de55c3ba5382bce59cac531094a217" alt="push frequency" width="1818" height="532" data-path="images/agent-analytics/akamai/frequency.png" />
  </Step>

  <Step title="Step 7">
    Review the configuration. It should look like the following:

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/review_configuration.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=620cb181cc50241f6db1a75fe1c60503" alt="Review configuration" width="3680" height="2382" data-path="images/agent-analytics/akamai/review_configuration.png" />

    When ready, click `Save stream`.

    <Warning>
      DataStream2 takes approximately **60 minutes** to start sending logs.

      Please wait for **60 minutes** before checking for logs.
    </Warning>
  </Step>

  <Step title="Step 8">
    After creating the stream, you will now be instructed to activate the stream.

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/activate_stream.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=b3154f5ac1dbc08cec3ea597d1352300" alt="activate stream" width="1826" height="594" data-path="images/agent-analytics/akamai/activate_stream.png" />

    Click `Proceed to Property Manager` and select the property you created the stream for.
  </Step>

  <Step title="Step 9">
    Click **Edit a new version** to add the stream to the property.

    Navigate to the **Property Configuration Settings**. Select **Standard property behavior** from the `+ Behavior` dropdown.

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/add_behavior.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=31859c483fef04f5143b991482e11c26" alt="add behavior" width="3680" height="2382" data-path="images/agent-analytics/akamai/add_behavior.png" />

    Search for **DataStream** and click `Insert Behavior`

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/datastream_behavior.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=10ece92a22b6a37d5abf9a765a0e66ad" alt="datastream behavior" width="1758" height="990" data-path="images/agent-analytics/akamai/datastream_behavior.png" />

    <Info>
      The behavior will show **DataStream 1**. Ignore this as you will select version 2 later.
    </Info>
  </Step>

  <Step title="Step 10">
    Scroll down to the **DataStream** section and select:

    * **DataStream2** from the **Stream Version** dropdown.

    * Toggle **Enable** to **On**.

    * Select the stream you created in the **Stream Name**.

    * Select a sample rate. **100%** is recommended.

          <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/add_stream_to_property.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=2c1d7e35b4578b1d9d5088abca0c9992" alt="datastream settings" width="2418" height="534" data-path="images/agent-analytics/akamai/add_stream_to_property.png" />
  </Step>

  <Step title="Step 11">
    Select **Log Delivery** from the left sidebar.

    Enable:

    * **Log Host Header**

    * **Log Referer Header**

    * **Log User-Agent Header**

    Leave the other settings as their default values.

    <img src="https://mintcdn.com/profound-37face47/dU1U8PbY91PjiXyk/images/agent-analytics/akamai/log_delivery_behaviors.png?fit=max&auto=format&n=dU1U8PbY91PjiXyk&q=85&s=e5ab3c16f61a247431ddd4f38a9ad445" alt="log delivery settings" width="3680" height="2382" data-path="images/agent-analytics/akamai/log_delivery_behaviors.png" />
  </Step>

  <Step title="Step 12">
    Save the configuration and activate the new version.
  </Step>
</Steps>

<Check>
  That's it! Akamai will now send real-time logs to Profound. Data should begin appearing in your dashboard within **60 minutes** of activating the stream.
</Check>

## Troubleshooting

* Ensure your stream is activated, connected to the property, and that the property has been updated

* Ensure your Log Ingestion Token is correct

## Additional Resources

* [Akamai Datastream2 Documentation](https://techdocs.akamai.com/datastream2/docs/welcome-datastream2)

* [Creating a Stream Documentation](https://techdocs.akamai.com/datastream2/docs/create-stream)

* [Data Set Parameters Documentation](https://techdocs.akamai.com/datastream2/docs/data-set-parameters)

* Contact [support@tryprofound.com](mailto:support@tryprofound.com) for API-related questions

## Security Considerations

* Regularly rotate your Log Ingestion Token

* Monitor your log drain usage for unusual patterns or unexpected traffic spikes
